#React JS 19 Full Course 2025 useState issue

3 messages · Page 1 of 1 (latest)

buoyant sun
#

Hey there guys, watching the latest JSM video - https://www.youtube.com/watch?v=dCLhUialKPQ&t=2s&ab_channel=JavaScriptMastery at around 29 minutes he uses const [hasLiked, setHasLiked] = useState(initialState:false) - this bricks the whole code and the solution I found was useState(false) which was recommended. I'm unsure if I did something wrong and wanted some clarification if possible.

Dive straight into React—from basic JSX to advanced hooks—and build a real, modern app in this hands-on crash course!

⭐ Hostinger - https://hostinger.com/mastery10
⭐ Appwrite - https://apwr.dev/JSMJAN2025
🌟 Webstorm - https://jb.gg/GetWebStormFree

⚛️ Ultimate React Course Waitlist - https://resource.jsmastery.pro/react-course-waitlist

🎨 Movi...

▶ Play video
strong knoll
#

If you watch carefully, he never typed "initialState". That is an "inlay hint" provided by the IDE. It lets the developer know what that value is being used for, but it's not actually part of the code. I had recommended disabling inlay hints because several others have been similarly confused, but he has ignored my recommendation.

buoyant sun
#

ohh since I'm not using webstorm I hadn't realized that's why it looked like that