tools available Don't know which one to choose Not sure from where to start Things change so fast JS language, ecosystem and the web are experiencing tons of changes Need to stay tuned with the changing trends Functional Programming vs OOP and what not.
Write your UIs as a pure functions of your state JSX brings the best of javascript in writing components in a declarative manner No messy spagetti code for DOM manipulation anymore.
Even in your existing angular or ember projects for developing new features Could be used for Server-side rendering Could power mobile apps using React Native
let you break down the UI into independent, reusable parts Conceptually, they are similar to functions that take some input (props) and return output (UI)
function that takes in props and return react elements or other components. Stateful Components - A component with an ability to contain and maintain it's own private state.
state management. State is all the information about your UI such that it's possible to re-create the same UI given the same state. State could contain any thing from the data, UI current states, routes etc.
can de ne them using ES6 class . class Clock extends React.Component { constructor(props) { super(props); this.state = {date: new Date()}; } render() { return ( <h2>It is {this.state.date.toLocaleTimeString()}.</h2 ); } }
within the component It only could be passed down as props to other components The only to trigger the UI update is to trigger state change Think as if everything re-renders on state change and the Virtual DOM takes care of things behind the scenes