Top Banner
Introduction to React JS Lohith G N
19

Introduction to React JS

Apr 12, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to React JS

Introduction to React JSLohith G N

Page 2: Introduction to React JS

About Me

Technical EvangelistMicrosoft MVP (ASP.NET/IIS)

[email protected]

@kashyapahttp://www.kashyapas.comhttp://www.telerikhelper.net

Lohith G N

http://www.telerik.com

Page 3: Introduction to React JS

React JS

Page 4: Introduction to React JS

ReactA JavaScript library for building User Interfaces

Developed by Facebook/Instagram

Page 5: Introduction to React JS

Just the UIV in MV* frameworks

Page 6: Introduction to React JS

Virtual DOM• Internal MOCK DOM• Performs Diffs• Computes Efficient DOM Mutation

Page 7: Introduction to React JS

Data FlowOne way reactive data flow

Page 8: Introduction to React JS

Why React ?

Page 9: Introduction to React JS

Simple• Express how your app should look

• React automatically manages UI updates

• UI update only when underlying data changes

Page 10: Introduction to React JS

Declarative• When Data Changes, React updates the changed parts

Page 11: Introduction to React JS

Composable Components• You build components

• Reusable Components

• Code reuse, testing, Separation of concerns

Page 12: Introduction to React JS

Simple Component

Page 13: Introduction to React JS

JSX – Markup in JavaScript

Page 14: Introduction to React JS

Component Life Cycle

• Mounting• Inserted into DOM• componentWillMount(), componentDidMount()

• Updating• Re-Rendered

• Unmounting• Removed from DOM• componentWillUnmount()

Page 15: Introduction to React JS

Component State

• Components are State Machines to REACT

• Update Component State, render new UI Based on new State

• getInitialState()• Defines initial state

• setState• Set new state

Page 16: Introduction to React JS

Thinking in React

Page 17: Introduction to React JS

Requirement

Page 18: Introduction to React JS

UI BreakdownFilterableProductTable

SearchBar

ProductTable

CategoryRow

ProductRow

Page 19: Introduction to React JS

Demo