I’ve recently been reflecting on Solid and its impact on me as a developer. I’m not exactly sure why I picked up Solid but I think it was mostly just the curiosity. A lot of my mental model carried over from React which was great! I like to think my React skills helped me pick up Solid, and in return my Solid skills are now feeding back into my React skills.
There are a couple things from Solid that I can point to that help me in my day job as a React developer.
- It made me interested in how things work under the hood
- It reinforced the best practices I had learnt from React
- I learnt a bunch of new things, and alternatives to doing things
So If I was honest, before learning Solid I had a very limited understanding of many concepts such as suspense and http streaming. I was aware of them within React but didn’t grasp how to use them. For example, how was suspense different than an isLoading
state?
React intentionally hides some of this complexity from you, but with Solid its fairly fundamental to understand. This is when I started tuning into Ryan Carniato’s streams. Ryan really goes deep into the framework intricacies which I appreciate.
I’ve since been exposed many other things like server components, data loading patterns, and file based routing. I truly believe knowing a bit of how these things work under the hood makes me a better developer. React’s suspense, and Next’s file based routing mechanically can work very different, but I have a wider viewpoint on the problem they are solving.
Another thing Solid did was reinforce the best practices I had previously learnt from React. This is no accident as Ryan has taken a lot of inspiration from early React. I believe these best practices help me avoid shooting myself in the foot with the new found freedom.
Some of these best practices are:
- local state to component
- read/write segregation
- derive state instead of synchronize
- having state at the lowest common ancestor
I also have learnt a bunch of new concepts which have broadened my mindset. I had no idea what signals were before Solid. I still sometimes have trouble describing them, but they are a powerful tool to have. It’s pretty cool seeing a bunch of frameworks consolidating around this primitive.
I learnt about a different way of doing JSX which includes For
, Show
, and Switch
components instead of things like map
, and ternaries.
Conclusion
You might think that learning Solid is a waste of time and you’d rather spend all your energy going deeper into React. I suggest to take a different approach. Take a peek outside the world of React and see if you don’t come out stronger on the other side.
Happy coding!