loading...

Discussion on: useState() React Hooks(P1)

Collapse
emmabostian profile image
Emma Bostian ✨

Nice post!! You can also combine the react default and named imports like this!

import React, {useState} from “react”

I’m on my phone so sadly no back ticks. But nice job!!

Collapse
emmabostian profile image
Emma Bostian ✨

Also might be worth noting that the hooks have to be the first thing in the function :) that confused me when I was starting!

Collapse
danijelajs profile image
Danijela.js🛸 Author

You are right, I'll add that to the article! 😊

Collapse
danijelajs profile image
Danijela.js🛸 Author

Thanks! Yeah, I know, it's just "a thing" I do without even thinking about it. 😅