Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React-ing to WordPress (WCNYC '16)

React-ing to WordPress (WCNYC '16)

React’s been taking the tech world by storm. WordPress developers have been tasked with “Learning JavaScript deeply” — and React is a great JavaScript tool to know. With the WordPress REST API in development, combining React and WordPress is becoming easier. In this talk we’ll review React and some related tools, talk about who’s already using it, and explore how you can use React in WordPress (and why you may or may not want to).

Kelly Dwan

July 17, 2016
Tweet

More Decks by Kelly Dwan

Other Decks in Technology

Transcript

  1. @ryelle | #wcnyc var Hello = React.createClass( { render: function()

    { return ( <div>Hello {this.props.name}</div> ); } } ); ReactDOM.render( <Hello name="World" />, document.getElementById('container') );
  2. @ryelle | #wcnyc var Hello = React.createClass( { render: function()

    { return ( <div>Hello {this.props.name}</div> ); } } ); ReactDOM.render( <Hello name="World" />, document.getElementById('container') ); Hello World
  3. @ryelle | #wcnyc var Hello = React.createClass( { render: function()

    { return ( <div>Hello {this.props.name}</div> ); } } ); ReactDOM.render( <Hello name="Sara" />, document.getElementById('container') ); Hello Sara
  4. @ryelle | #wcnyc React.createClass( { propTypes: { isEnabled: React.PropTypes.bool, onThingClick:

    React.PropTypes.func, count: React.PropTypes.number, title: React.PropTypes.string.isRequired }, …
  5. @ryelle | #wcnyc var TodoApp = React.createClass( { getInitialState: function()

    { return { nowShowing: app.ALL_TODOS, editing: null, newTodo: '' }; }, handleChange: function( event ) { this.setState( { newTodo: event.target.value } ); } …
  6. @ryelle | #wcnyc • propTypes • code standards: eslint •

    JSX is not HTML • javascript testing React Standards
  7. ?