React "update" immutable nested objects.

Опубликовано: 30 Октябрь 2024
на канале: Obsolete Programmer
935
14

This React demo shows the difficulty in 'updating' multiple nested objects.

1. yarn create react-app immutability-demo
2. cd immutability-demo
3. Create three files: OneLevel.js, ThreeLevels.js, FourLevels.js. Files contents are in the video.
4. Edit App.js. File content is in the video.
5. yarn start

The more nested the object, the more difficult it is.