We know that whenever there is a state change in React, it will result in a re-render. Recently, I came across a beautiful way to describe React in terms of the function of the state, which can be written as v=f(s), this means the view will only chan...

Markdown supported · ⌘↵ to post
Sakshi Chaudhary
An Vo
Software Engineer
Nice about the tricky thing that inside the
handleClickfunction, the alert(theme) is "light" even though we've justsetTheme("dark")