Erik Rasmussen, creator of Redux Form and Final Form, discusses his journey with React, exploring SolidJS as an alternative. They compare React and SolidJS syntax, delve into the concept of signals for reactivity, discuss Solid Stores, and compare SolidJS with Angular in terms of data binding. They also touch on the use of context and flow control in SolidJS for more readable JSX output.
SolidJS offers a unique approach to rerendering by tracking dependencies granularly, resulting in better performance compared to React's virtual DOM.
Transitioning from React to SolidJS requires adjusting to differences in using signals and directly incorporating signals in JSX rather than destructuring props.
Deep dives
SolidJS: A Similar But Different Beast from React
Eric Erasmus, the creator of Redox form and Final Form, discusses SolidJS—a JavaScript UI library. He explains that although he was initially a Java developer, he was drawn to React's value and began building with it. However, he experienced limitations in React's form functionality, leading him to create form libraries himself. Intrigued by the possibility of a React replacement, Erasmus explores various contenders but found SolidJS to be a truly unique option. He discusses his experience with other frameworks like Vue and Svelte, which didn't resonate with him. With SolidJS, Erasmus highlights the syntax similarities with React, making it more approachable for React developers. He compares the declarative nature of React and SolidJS and emphasizes SolidJS's unique approach to rerendering. Unlike React's virtual DOM, SolidJS tracks dependencies more granularly, allowing it to update only the necessary parts of the DOM, resulting in better performance. He also discusses SolidJS's adoption of declarative programming and its ability to create custom hooks similar to React. Erasmus acknowledges that SolidJS is still a relatively new library with a developing ecosystem. However, he encourages developers to explore and contribute to the framework, turning its immaturity into an opportunity for growth.
Potential Pain Points When Transitioning from React to SolidJS
Eric Erasmus shares some pain points he encountered when transitioning from React to SolidJS as a React developer. He highlights key differences between the two, including SolidJS's use of signals, which are similar to React's state but require a slightly different mindset. Erasmus notes that SolidJS components are called only once, unlike in React, where components can be rerendered multiple times. This adjustment was initially challenging for him. He also points out that SolidJS requires signals to be used directly in JSX, rather than destructuring props like in React. This change can affect the reactivity of SolidJS components. Erasmus explains that becoming familiar with these differences and understanding SolidJS's unique patterns and requirements is crucial for a smooth transition from React to SolidJS.
The Future of SolidJS and Potential Improvements
Eric Erasmus expresses the belief that SolidJS has a promising future due to its performance advantages and similarities to React. He mentions SolidJS's server-side rendering capabilities through Solid Start, a next.js-like framework. However, Erasmus acknowledges that the SolidJS ecosystem is still growing and lacks the maturity and variety of libraries that React offers. He encourages developers to contribute to the SolidJS ecosystem by filling the gaps and creating useful libraries. Erasmus also points out some pain points he personally encountered with SolidJS, such as potential confusion around the usage of signals and the inability to destructure props. He suggests that the SolidJS team could improve the developer experience by providing linting rules to catch common mistakes and offer better documentation to address these pain points.
Evaluating New Technologies and Riding the SolidJS Wave
Eric Erasmus shares insights on evaluating and adopting new technologies. Drawing from his experience with React and becoming interested in SolidJS, Erasmus advises developers to have the willingness to learn and evaluate new tools. He emphasizes the importance of observing the industry and being open to new possibilities. He acknowledges that not every new technology will be the perfect replacement or best choice, but being open to change and improvement fuels growth and progress. Erasmus also underlines the value of contributing to open-source projects and how it can further one's career while also benefitting the overall ecosystem. He encourages developers to ride the SolidJS wave by identifying and filling the gaps in the growing SolidJS library ecosystem.
Erik Rasmussen, creator of Redux Form and Final Form, comes on to talk about how, as a React developer, he got started with Solid and why React developers should try it.
Follow us on Apple Podcasts, fill out this form, and we’ll send you free PodRocket stickers!
What does LogRocket do?
LogRocket combines frontend monitoring, product analytics, and session replay to help software teams deliver the ideal product experience. Try LogRocket for free today.
Special Guest: Erik Rasmussen.
Get the Snipd podcast app
Unlock the knowledge in podcasts with the podcast player of the future.
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode
Save any moment
Hear something you like? Tap your headphones to save it with AI-generated key takeaways
Share & Export
Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode