did you know you no longer have to import React from 'react' since react 17, we can skip writing that line reactjs.org/blog/2020/09/22/…

8:00 PM Β· Jan 12, 2021

9
19
129
Replying to @chris__sev
Awesome!
0
0
1
Replying to @chris__sev
that's just for the jsx bits? or everywhere?
2
0
0
Just JSX - in order to use Hooks and such, you still have to import React.
0
0
1
Replying to @chris__sev
I noticed it yesterday. You can also import React hooks, useState and useEffect without using import React syntax.
0
0
2
Replying to @chris__sev
Does this mean that all js files are ran through jsx preprocessing? πŸ€” how else would it know what to convert?
1
0
1
hmm good question
0
0
1
Replying to @chris__sev
I wish I could... Gatsby just don’t allow it πŸ₯Ί tried to update it and react too, but nothing changes. So i still write code like it’s React 16 πŸ™„πŸ˜–πŸ˜’
0
0
1
Replying to @chris__sev
That's old news
0
0
0
Replying to @chris__sev
yeaaayyyyyy
0
0
0
Replying to @chris__sev
Don't really like this feature. I'll like to know what I am importing. Already junior developers find it hard to understand why something is happening, things like this cause more issues.
0
0
1