JumpStart – React Lab

SetState() API informs React that your state has updated
Under the hood, it will compare the memory addresses of the object and render the new state.
React will still render the updated state if the memory address is the same, but performance will suffer (https://bogdan-lyashenko.github.io/Under-the-hood-ReactJS/stack/book/Intro.html)

Object.assign() and spread operator (for shallow copy):
this.setState(Object.assign({}, oldState, {a:6})
this.setState({…oldState, a:6})

–savedev for testing libraries so that it doesn’t get deployed with your app

bootstrap

scss @imports @extends

react testing library
black-box approach avoids testing implementation details

Leave a comment

Design a site like this with WordPress.com
Get started