|
|
|
|
|
by the_bear
3689 days ago
|
|
I ran into this recently myself. I've been doing web development my whole career, but I never got into the complicated toolchain side of it. I just used a vanilla html/javascript setup and I would build out my own tools or manually include existing libraries as I needed them (no webpack, etc.) Then it came time to learn React and pretty much every tutorial out there requires a twisted combination of npm, webpack, babel, etc. just to get a simple page running. I just about gave up. Then I realized that you can run React without any of that stuff by just copying the first section of sample code from this page: https://facebook.github.io/react/docs/getting-started.html So I started with that and built out my own simple framework. As I became more familiar with React and how it interacted with my own homemade framework, I was able to understand where all of the other pieces fit in, and gradually I've been including some third party tools that previously seemed insanely complicated to me (note: the toolchains still seem needlessly complicated, but at least I can generally get things to work now). |
|
Very quickly you'll find there are problems with managing your page lifecycle, and you might imagine a good solution to it. That solution probably looks a lot like Redux.
Then you might want some unit testing of your React components. Woo, that too has also has a satisfactory answer with Enzyme.
Slowly, you will add more and more to your toolkit. Before you know it, you have scaled the frontend ivory tower.
There is a rationale for all of this, but you shouldn't feel obligated to use any of it. You can save yourself a lot of headache down the line by starting with a project like React Boilerplate. Maybe you don't need 70% of the things in it? That's cool. Just start with it, build up the bits that you need using just 30% of it. Then maybe later, you want another 10% of it... it's already there, configured, and ready for you to use.