Deploy your React App on GitHub Pages

Note This example use Create React App , if you use other dev environment may have some difference, but not so big. If you are using react-router-dom please replace “BrowserRouter” as “HashRouter”. Links Live Demo Example on GitHub Repo Start 1. Create a repo on GitHub 2. Create a react App 3. Go to your app…

[React] example for use “dangerouslySetInnerHTML”

use dangerouslySetInnerHTML method with HTML element in React will allow your browser to explane HTML element,not just print it directly focus on  <div dangerouslySetInnerHTML={{ __html: this.props.context }} /> in child component class infoCard extends Component { render() { return ( <div id=”infoCard”> <div className=”card-block”> <h1>{this.props.title}</h1> <div className=”card-block-text”> <p> <div dangerouslySetInnerHTML={{ __html: this.props.context }} /> </p> </div> <div className=”center”> <Button…

Setting queues for Laravel 5

Something  I want to talk i have already contact laravel a little time for improve my coding skill and speed, and since i learn laravel with official document, i found some problem with it. there’s no doubt laravel is powerful and beautiful but the official docs is terrible. if anyone who used to learn with official…

[React]Class based and Functional based transform

Class based class MyButton extends React.Component{ //init constructor(props) { super(props); this.state ={btnText:”click me”} this._clk = this.clk.bind(this) } clk(){ this.setState({ btnText:”click!” }); } render(){ return( <div> <button type=”button” id=”123″ onClick={this._clk}>{this.state.btnText}</button> </div> ) } } ReactDOM.render( <MyButton />, document.getElementById(‘root’) ); Functional based var NewComponent = React.createClass({ getInitialState: function(){ return { textContent:”click me” }; }, _event:function(e){ console.log(“click”); console.log(e.target.textContent);…