<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>React Archives : Binary Bits</title>
	<atom:link href="https://blog.binarybits.net/tag/react/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.binarybits.net/tag/react/</link>
	<description>Bits &#38; Pieces - A blog by Kannan Balasubramanian</description>
	<lastBuildDate>Sun, 26 Apr 2020 09:45:41 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>React &#8211; Call function from HTML Tag with parameter</title>
		<link>https://blog.binarybits.net/call-react-function-from-html-with-parameter/</link>
					<comments>https://blog.binarybits.net/call-react-function-from-html-with-parameter/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Sun, 26 Apr 2020 08:26:06 +0000</pubDate>
				<category><![CDATA[React]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1236</guid>

					<description><![CDATA[<p>Sometimes we need to call a React function from HTML tags with parameters or arguments and following is the ES6 based way. Here a button is calling a function updateName with argument newName to set a state which in turns changes the name being displayed. Do note that using this.updateName.bind() is the recommended way due [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/call-react-function-from-html-with-parameter/">React &#8211; Call function from HTML Tag with parameter</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img decoding="async" class="wp-image-1249" style="width: 64px;" src="https://blog.binarybits.net/wp-content/uploads/2020/04/react-logo.svg" alt="React">Sometimes we need to call a React function from HTML tags with parameters or arguments and following is the ES6 based way.</p>



<p>Here a button is calling a function <em>updateName</em> with argument <em>newName</em> to set a state which in turns changes the name being displayed. </p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">import React, { Component } from 'react';
import { render } from 'react-dom';
import './style.css';

class App extends Component {
  constructor() {
    super();
    this.state = {
      name: 'Kannan'
    };
  }

  updateName = (newName) =&gt;{
    this.setState({
      name: newName
    })
  }

  render() {
    return (
      &lt;div&gt;
        &lt;p&gt;My Name is {this.state.name}.&lt;/p&gt;
        &lt;p&gt;          
          &lt;button onClick={this.updateName.bind(this,'Kannan Balasubramanian')}&gt;Change the name&lt;/button&gt;&lt;br/&gt;
          &lt;button onClick={()=&gt;this.updateName('Kannan Balasubramanian!')}&gt;Change the name again&lt;/button&gt;
        &lt;/p&gt;
      &lt;/div&gt;
    );
  }
}

render(&lt;App /&gt;, document.getElementById('root'));</pre></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Do note that using <em>this.updateName.bind()</em> is the recommended way due to performance and efficiency concerns.</p></blockquote>



<p>You can try the sample output <a rel="noreferrer noopener" href="https://kannan-public-react-call-function-from-html-tag.stackblitz.io" target="_blank">here</a>.</p>
<p>The post <a href="https://blog.binarybits.net/call-react-function-from-html-with-parameter/">React &#8211; Call function from HTML Tag with parameter</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/call-react-function-from-html-with-parameter/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using React and Office UI Fabric React Components by Andrew Connell</title>
		<link>https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/</link>
					<comments>https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Thu, 09 May 2019 10:29:56 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Office UI Fabric React]]></category>
		<category><![CDATA[React]]></category>
		<category><![CDATA[SharePoint Framework]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1034</guid>

					<description><![CDATA[<p>For a long time I was trying to switch from Angular to React for building SharePoint Modern Web Part but was finding it difficult to start off. The lab posted here by Andrew Connell, helps to get started. You can also view the video below. You can also view the lab as document from the [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/">Using React and Office UI Fabric React Components by Andrew Connell</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img decoding="async" class="wp-image-1160" style="width: 32px;" src="https://blog.binarybits.net/wp-content/uploads/2020/03/microsoft-sharepoint-logo.svg" alt="Microsoft SharePoint Logo"> For a long time I was trying to switch from Angular to React for building SharePoint Modern Web Part but was finding it difficult to start off.</p>



<p>The lab posted <a href="https://github.com/SharePoint/sp-dev-training-spfx-react-fabric/blob/master/Lab.md">here</a> by Andrew Connell, helps to get started.</p>



<p>You can also view the video below.</p>



<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="SharePoint Framework Training - Using React and Office UI Fabric React Components" width="580" height="326" src="https://www.youtube.com/embed/TlSGdDZmrTM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>You can also view the lab as document from the below pdf file generated on 09 May 2019</p>



<div class="wp-block-file"><a href="https://blog.binarybits.net/wp-content/uploads/2019/05/SP-dev-training-spfx-react-fabric-lab.pdf" target="_blank" rel="noreferrer noopener">SP-dev-training-spfx-react-fabric-lab.pdf</a><a href="https://blog.binarybits.net/wp-content/uploads/2019/05/SP-dev-training-spfx-react-fabric-lab.pdf" class="wp-block-file__button" download>Download</a></div>
<p>The post <a href="https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/">Using React and Office UI Fabric React Components by Andrew Connell</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: blog.binarybits.net @ 2026-04-19 00:59:21 by W3 Total Cache
-->