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

Introduction to ReactJS

Introduction to ReactJS

React is a front-end library developed by Facebook. It's used for handling the view layer for Website, Native Mobile Apps and VR. ReactJS allows you to create reusable UI components. It is currently one of the most popular JavaScript libraries out there. With a strong foundation and a large community behind it.

This talk will discuss what is ReactJS. How and where you can use it. Followed by a workshop, where we will learn, how to build a component-based web-app using ReactJS.

For workshop code, notes and resources, see: https://github.com/usmanbashir/introduction-to-reactjs/

Usman Bashir

January 30, 2018
Tweet

More Decks by Usman Bashir

Other Decks in Programming

Transcript

  1. WHOAMI? • me@ usmanbashir.com • @ ubax • usmanbashir.com Who

    am I? Technology Consultant & Software Developer
  2. funtion submitForm() { // … var submitButton = $(‘button-id’); if

    (isFormValid === false) { submitButton.prop('disabled', true) .addClass('disabled'); } else { submitButton.prop('disabled', false) .removeClass('disabled'); } // … } Imperative (the old way)
  3. if (userLikes()) { if (!hasBlueLike()) { removeGrayLike(); addBlueLike(); } }

    else { if (hasBlueLike()) { removeBlueLike(); addGrayLike(); } } Imperative (the old way)
  4. PATCH … Set <h1> to After … Batch of DOM

    operations React Virtual DOM
  5. class SubmitButton extends React.Component { render() { const classes =

    `button submit ${this.props.disabled ? “disabled” : “”}`; return <input type='button‘ value='Submit‘ disabled={this.props.disabled} className={classes} />; } }
  6. class SubmitButton extends React.Component { render() { const classes =

    `button submit ${this.props.disabled ? “disabled” : “”}`; return <input type='button‘ value='Submit‘ disabled={this.props.disabled} className={classes} />; } }
  7. So... • Notes & Resources • Learn more • Build

    something • Share it with the community What's Next?