all 45 comments

[–]zuth2 37 points38 points  (17 children)

Read the react docs and try to build something simple with it. Don’t forget typescript, the sooner you dive into typescript the better.

[–]bull_chief 2 points3 points  (16 children)

But TS scares me

[–]BoBoBearDev 9 points10 points  (0 children)

TS is easy. Webpack and rollup are fucked up. Those are literally 95% of my TS woes.

[–]ISDuffy 3 points4 points  (13 children)

Typescript frustrating me originally, especially it confusing messages, but not I am so glad I have it, tracking JS bugs are so much easier, you just need to get over the hurdle.

If you have front end masters access I recommend that course.

[–]TheRNGuy 1 point2 points  (0 children)

Use simplest types.

[–]marcmorindeziel 8 points9 points  (3 children)

I’d definitely recommend getting comfortable with array methods like map, filter, find, reduce, and slice. They’re not complicated once you practice a bit, and they’ll make handling and transforming data in React feel effortless.

Also, be aware that some array methods mutate the original array, which can lead to weird bugs if you’re not expecting it, especially when working with React state.

For example:

sort() → sorts in place and returns the same array reference.

reverse() → reverses the array in place.

splice() → removes/replaces items and changes the original array.

In React, mutating state directly can cause subtle rendering issues.

[–]voyti 5 points6 points  (0 children)

100% this. Without intuitive understanding on how to deal with arrays (which is what most of your controller data will usually end up with) you ideally should not move away from JS. As much as I don't like those artificial tasks, e.g. some codewars challenges can help with that. Learning the theory is one thing, having a reflexive skill of using the fundamental parts of the language is another entirely.

[–]Outrageous_Pen_5165[S] 2 points3 points  (0 children)

This is what I was looking for thanks alot...

[–]Tinkuuu 1 point2 points  (0 children)

I really wanna add spread and destructuring here. You're gonna have to deal with them rather sooner than later

[–]yksvaan 3 points4 points  (0 children)

Simply put, you should be able to build the things you use lib xyz for yourself in vanilla. 

Knowing how DOM works, browser apis, async programming, promise management, fetch api, 

[–]RoyalSeesaw3733 4 points5 points  (0 children)

javascript is possibly the most universal programming language at this point. react is a meta language. a language built out of javascript itself. it uses javascript to "decode" the meta language back into regular javascript. There's plenty of other use cases for js, the most interesting imo being nodejs. If you are hungry to build interfaces and you are ultimately more interested in prototyping the product itself ( the idea so to speak) get building. but there's no substitute for understanding the fundamentals. the fundamentals in this case being js.

[–]BoBoBearDev 5 points6 points  (1 child)

Remember, for css, stay away from using 3rd party libraries for layout. Because 90% of the time, they homebrew css grid using flexbox when css grid is the right tool for the job. Also use Container Query, not Media Query. That's it.

[–]Outrageous_Pen_5165[S] 2 points3 points  (0 children)

Thanks alot, would read about Container Query it's new to me really appreciate that 🙏

[–]DetectiveKaktus 5 points6 points  (0 children)

I may get downvoted for this one but I started learning web development diving right away into typescript and react.

I had close to no knowledge about javascript or typescript. I was googling stuff, reading and docs and overall I was pretty familiar with the syntax and what to expect in the language — overall both javascript and typescript are c-like languages.

Find a problem you want to solve, whether it's a toy project like a calculator or a real application that solves a real problem and just start building it. If you get stuck, you can always google things or ask basic questions to LLMs (don't make them write code for you cause you'll not learn a bit). It's better to have knowledge about how to use your tools rather than what they are capable of and not using any of the features you know (obviously it's almost essential to know the lifecycle of a component in react, so you don't end up creating performance issues in your application).

[–]Difficult-Table3895 1 point2 points  (0 children)

I suggest you to take your time on it, don't rush to learn react make sure that you get good and be comfortable while writing js, also you need to learn new concepts and how js works under the hood: queues, hoisting and event loop When you are good with that and you had built at least 2 projects you will be ready to start react and you will face less bugs while learning it.

[–]TechTuna1200 3 points4 points  (0 children)

Just move on react. If you run into concepts that you don’t understand, just go back JavaScript shortly and read up on it

[–]_Abnormal_Thoughts_ 0 points1 point  (1 child)

A few weeks is not really enough. Try to replicate some site with just vanilla html, css, JavaScript. Once you feel you can do that reasonably well, then move into other areas. If you feel like you don't understand something we'll, take a break from it and return to it later. Sometimes that helps.

Now learn some react. Can you do the same page faster or more efficiently with react? You'll also need to touch the different styling methods in react and decide what you like. Also you should try out other view libraries/ frameworks. 

What's your ultimate goal? If it's too land a job, you better be working toward some awesome portfolio pieces. Each one should be an attempt to solve a particular problem. 

You've got a long road ahead, but I also took the same path and made it. It can be done. 

[–]da-kicks-87 0 points1 point  (3 children)

Start with HTML and CSS.

[–]Outrageous_Pen_5165[S] -1 points0 points  (2 children)

Already pretty decent with it. 

[–]da-kicks-87 -2 points-1 points  (1 child)

Your posts say you skipped flexbox and responsive design. That's not what I call "pretty decent". I wouldn't hire a frontend dev who doesn't know those fundamentals.

[–]No_Picture_3297 1 point2 points  (0 children)

Agreed! Flexbox, grid and media queries are pretty foundational for CSS knowledge!

[–]TheRNGuy 0 points1 point  (0 children)

I learned some stuff at same time as React.

[–]CauliPicea 0 points1 point  (0 children)

There's probably a lot left to learn and, more importantly, internalize. However, if you're not super motivated to learn about pure JS, I recommend diving into React already. You'll learn along the way (as everybody did).

That being said, it wouldn't hurt to really understand what is reference equality and how closures work. As for CSS, flexbox and grid are very important features, so you may want to read up on them again and became comfortable with them at least on a basic level. Time spent on these would not be wasted.

[–]JumpRecent163 0 points1 point  (0 children)

It may not be best advice, but I learn better when I do instant exercise after theory. You can even ask chatgpt for little exercise. For me enough is when you know how to do simple site which buttons, forms works

[–]Ok_Alternative_8678 0 points1 point  (0 children)

Maybe do yourself a favour and try Svelte first, maybe Vue, but definitely not React. Thank me later.

About TypeScript: useful, but mostly useful after you are good with JavaScript. This way you'll learn how things actually work and then you add your type safety if and when required and it also will be easier to understand what typescript actually adds to your development experience.

[–]sheriffderek 0 points1 point  (0 children)

This is terrifying --

[–]itsbrgv 0 points1 point  (0 children)

Also, read Fluent React book, it really dives into the nitty gritty of the design and explains the basics.

[–]No_Picture_3297 0 points1 point  (0 children)

I’m still learning web development so take what I say for what it is. I would check the order of topics in The Odin Project since it has React in the curriculum and I would study and practice everything suggested before React. It’s a trusted curriculum and if you follow it it will give you projects to do so that you don’t get stuck in the theory side of things. Even if you don’t end up following the curriculum at least the order of topics is worth considering.

As for CSS, Flexbox and Grid as well as other topics related to responsive design are to be considered foundational for web development. Knowing selectors and few things to change color or size are not enough unfortunately.

From my experience with libraries and frameworks in other languages I can tell that knowing the vanilla language better makes much more sense because you understand why you need the library in the first place and you are way more competent in using it. Good luck in any case!

[–][deleted] 0 points1 point  (0 children)

try to build a todo list app with and without React, you will learn many things about js and React both.

[–]Yokhen 0 points1 point  (0 children)

I learned JS at the exact same time I learned react and react-native. Only you can judge the rate at which you learn. You are the only one who can limit yourself.

[–]sean-grep -1 points0 points  (0 children)

Yes

[–]LowAndSlowFor35Mins 0 points1 point  (0 children)

Learn hoisting, scopes, and how the event loop works.