Hi @JohnnyBizzel
Personally, I love React, or at least, I love the whole idea of small, composable components inside of JavaScript. It makes writing dynamic applications a lot easier than using something like jQuery. Obviously, if youāre just creating a static page that has little interactivity, then using React is probably overkill.
Another library that seems to be picking up some steam is Vue. I havenāt looked into it too much yet but it seems to be a hybrid of Angular and React that also has some interesting ideas.
I agree, managing state between components can be a headache, thatās why I tend to use Redux if Iām dealing with data that is anything more than binding an inputs value to state. Having a central, easy to access, state object makes live SOOOO much easier. Redux also provides some useful bindings for use with React: GitHub - reduxjs/react-redux: Official React bindings for Redux.
Also, if you donāt need to manage state or refs inside a component, you can use a functional component which, I believe, React optimises for speed.
function MyComponent(props, context) {
return (
<div>
Stuff...
</div>
);
}
You can also decrease the initial load times by using server rendering, so the server compiles the initial page state into an html string, which you then send to the client on load.
As for the real world, I couldnāt really comment on that as Iām not professionally developing yet, however, I believe I read somewhere that 80% of your job is likely to be maintaining existing code. So if a code base is well written, fixing issues in small components should be fairly easy and quick compared to fixing code in a jQuery codebase; at least, I would think so anyway.
Do you mean freecodecampās site? I personally wouldnāt know if thatās normal or not; I can say that by itself, React is around 25000 lines, so that would add a bit of meat to that total.