How to use setState in React - Managing Complex Objects

Veröffentlicht am: 11 Juni 2020
auf dem Kanal: deepcode
375
6

In this Nibble, we show a typical issue in React applications regarding their state management.

Note: I am using the class-components and not the more modern functional components with hooks because this is what we see currently in the "wild".

0:00 - 6:42 Intro
6:43 - 7:28 InfoBox - Shallow Copy
7:29 - 13:53 How to make it right

Guest Star: MC Hammer    • M.C. Hammer - U Can't Touch This  

Examples:
Changing state in place, then calling setState
https://www.deepcode.ai/app/gh/dnnsof...

Object in state:
https://www.deepcode.ai/app/gh/dnnsof...

Array in state:
https://www.deepcode.ai/app/gh/dnnsof...

setState Explained:
https://reactjs.org/docs/react-compon...

PureComponent:
  / working-with-react-pure-components  

You can install the DeepCode Visual Studio Code PlugIn by clicking on this link https://marketplace.visualstudio.com/...


Auf dieser Seite können Sie das Online-Video How to use setState in React - Managing Complex Objects mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer deepcode 11 Juni 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 375 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!