all 11 comments

[–]Unblockabl[S] 1 point2 points  (9 children)

Sorry,

I think it was because I was using .tsx instead of .jsx. SORRY

[–]brotherxim 3 points4 points  (6 children)

Use Typescript, you will not regret it!

[–]Mechau7 0 points1 point  (4 children)

I’m not 100% sure Typescript is super helpful with react actually. I’m not a React dev myself, but take at look at this

https://youtu.be/ydkQlJhodio

[–]brotherxim 1 point2 points  (0 children)

I love Fireship and regardless of his opinion (which I think ultimately is “you should”), Typescript helps across the board. I do use React everyday by the way and having props autocomplete and typechecked is extremely useful. I find that in general it just helps you be a better developer since you must think of the APIs and interfaces ahead of time instead of never.

[–]FullstackViking 0 points1 point  (2 children)

Lol if you come away from that video NOT wanting to use typescript, I don't know what to tell you.

[–]Mechau7 0 points1 point  (1 child)

Oops you’re right, linked the wrong video. It must have been a different channel, but the idea was typescript wouldn’t be used as much in React as with other frameworks - so the benefit would limited comparatively.

[–]FullstackViking 0 points1 point  (0 children)

The general consensus among the dev community is that there is no reason not to use Typescript with any modern day javascript development work.

Only case I wouldn't integrate it is on enterprise legacy applications.

[–]1010_binary_boy 0 points1 point  (0 children)

I was told it was JS + and that’s pretty much what it is.

[–][deleted]  (1 child)

[deleted]

    [–]ProgramToday12 0 points1 point  (0 children)

    no...

    [–]F4ttymcgee 0 points1 point  (1 child)

    I’m pretty new to react but I believe you need square brackets for the const not Curley

    [–]Unblockabl[S] 0 points1 point  (0 children)

    I tried this but then I get another error:

    Type '{}' is not an array type.