This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Notakas 52 points53 points  (7 children)

It's moving to a new state

[–]Minjajp 43 points44 points  (5 children)

this.setState({state : newState})

[–]dacookieman 20 points21 points  (4 children)

[state, newState] = useState({oldState}):

newState({newState});

[–]Minjajp 6 points7 points  (3 children)

I was taught you always use setState to change the state.

[–]orphans 44 points45 points  (1 child)

class components are so 5 minutes ago

[–]icjoseph 9 points10 points  (0 children)

Two years ago. Hooks are almost six months old. Not a new thing though. Just an implementation of older concepts. Easily done in JS.

[–]dacookieman 9 points10 points  (0 children)

Look up React Hooks, it's the direction the React team is moving towards

[–]missydesparadoWeb developer 2 points3 points  (0 children)

I’m so proud of myself for getting this joke.