Wednesday, 6 September 2017

Explain state and props in React

1. state=> The heart of every React component is its “state”, an object that determines how that component renders & behaves. In other words, “state” is what allows you to create components that are dynamic and interactive.
state is mutable
2.props=> props is immutable and can be used to communicate between child and parent component.

No comments:

Post a Comment

What is diffing algorithm?

  React needs to use algorithms to find out how to efficiently update the UI to match the most recent tree. The diffing algorithms is genera...