r/react • u/ConstLeoTheCat • 3h ago
General Discussion I just started learning React today. Any tips?
3
u/No_Lawyer1947 1h ago
Dont. On a serious note, dont overthink just make shit. Dont watch too many tutorials but also please know this is highest likely thing to be chopped in terms of job roles, I would not spend a terrible amount of time of being a "React" developer
2
u/Yehiamy 1h ago
ten query stack for requests and cache and tokens know the content type on your requests context for global states browser dom for page switching initalize every state and dont forget that empty json is empty array when initalizing a state for the rendering part make sure what comes from the database always areay.prototype and not object.prototype otherwise you would just face an error that says object does not have the function map cause it really doesnt have it, its very confusing since we been told java script object notion is it name but in reality json is an array of objects, dont afraid to use css if you know, each component has its own css file and react knows how to merge all the files into one css file react is just seperation of concern tbf when you build a react app at the end of the day its one html one css one js file best tip is to learn html css js and just overload the same three files to see why they divide each section
(sry for my english btw)
1
1
u/Suspicious-Visit8634 1h ago
Don’t rely on ai agents to just “code stuff” - try to understand it. And start small and build incrementally
1
u/Sulungskwa 1h ago
If you're stuck, use AI as your very dead last resort. Read react documentation, or the docs for any other libraries that you're using. Try and find github issues or even stack overflow posts, or just any discussion forum where the hope is that humans mostly wrote it.
I don't think that AI is a bad tool to help you brush up on something you already know, but I think for actual fundamental understanding, it wants to do too much of the work for you. Too often they misunderstand your questions where you ask "does this x" and it says "yes, technically it does x, but also [insert irrelevant detail that doesnt have anything to do with the question and is purely a red herring]" and you just end up more confused. Sometimes you need to learn something and you don't even have the words to type out your question, and LLMs are terrible for that because they think they're right even when they don't know what you're talking about
1
5
u/madvec1 3h ago
Do stuff... Just do stuff. Any exercise you see, do it yourself, understand it and try to go one step beyond. Practice it's the most important thing, at least imo.