Question
What happens when you call setstate?

Answers

The first thing React will do when setState is called is merge the object you passed into setState into the current state of the component. This will kick off a process called reconciliation. The end goal of reconciliation is to, in the most efficient way possible, update the UI based on this new state.
To do this, React will construct a new tree of React elements (which you can think of as an object representation of your UI). Once it has this tree, in order to figure out how the UI should change in response to the new state, React will diff this new tree against the previous element tree. By doing this, React will then know the exact changes which occurred, and by knowing exactly what changes occurred, will able to minimize its footprint on the UI by only making updates where absolutely necessary.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What is a subtype and super type entity?
  • Q What do you know about HPCL?
  • Q What cartoon characters catchphrase was "Exit stage left"
  • Q What is the importance of planning?
  • Q Explain what do you mean by run-time objects?
  • Q What are the filing requirements in india for a non resident indian?
  • Q What is the official name for Silverlight?
  • Q Keratoplasty means the transplantation of:
  • Q Do beings of the class Reptilia have direct or indirect development?
  • Q What is the difference between char & Character classes? Which one is value type and which one is ref type?
  • Q Of Albanian descent, by what name is 1979 Nobel Prizewinner Agnes Gonxha Bojaxhiu better known?