Comments (1)
Hi @AubreyNeimeier,
I totally agree about the spread operator and have updated the solution accordingly. Thank you for pointing this out!
In regards to the handleClick solution, it is not recommended that this.state
is called from within setState
as there is a possibility that the state changed asynchronously just before. It is better to use the functional version of setState to ensure state doesn't change between the time setState
is called in your code and when it actually fires asynchronously in a batch
from react-updating-state-lab.
Related Issues (11)
- Error: Method “simulate” is only meant to be run on a single node. 0 found instead. HOT 2
- npm server - error when try to start server HOT 1
- Previous State has not been covered HOT 1
- Problem with tests and bitrate. HOT 1
- Missing critical information about YouTubeDebugger HOT 2
- Routes to wrong 'Next' lab HOT 1
- Error when using bundle script
- In DigitalClicker.js: ++this.state.timesClicked mutates directly. HOT 1
- Instructions are much clearer than other labs HOT 1
- Code snippet incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-updating-state-lab.