SolidStart: The Shape of Frameworks to Come

Rate this content
Bookmark

The long-awaited moment has arrived: SolidStart is out of Beta!
But what does this mean for us?
What should we all know about this unopinionated meta-framework?
Join me to learn everything you need to start shipping full-stack SolidJS applications.

This talk has been presented at JSNation US 2024, check out the latest edition of this JavaScript Conference.

FAQ

Server-side rendering involves generating web pages on the server rather than in the browser, which can improve load times and performance by offloading some processing tasks from the client to the server.

SolidJS is a JavaScript library focused on fine-grain reactivity, allowing developers to create highly efficient UI updates without running extra code to determine changes.

Fine-grain reactivity in SolidJS uses signals to notify the framework of changes, enabling more efficient updates compared to coarse-grain reactivity, which requires running code to find where updates occur in the UI.

Meta-frameworks are important because they offer multiple rendering modes, improved developer experience, and faster production times by encompassing essential components like routing and server runtime.

Examples include Nuxt for Vue, Analog for Angular, and Next.js or Remix for React.

The router is often the most opinionated part of a meta-framework, serving as a core component that dictates how navigation and data fetching are handled within the application.

Solid Start is a meta-framework for SolidJS that provides a non-opinionated, flexible way to start building applications, allowing developers to choose their own components and configurations.

Single-flight mutation in Solid Start allows for efficient data updates by combining POST requests and data fetching into a single network request, minimizing delays and improving performance.

Solid Start optimizes data fetching by using features like data preloading and caching, reducing network requests and improving application performance.

The 'useServer' directive in Solid Start allows certain functions to be executed on the server, facilitating efficient data fetching and processing while reducing client-side load.

Daniel Afonso
Daniel Afonso
21 min
21 Nov, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Hello, JS Nation. I'm here to tell you about some interesting stuff I've been working on using SolidJS. SolidJS introduced fine-grain reactivity and signals six years ago, while other frameworks are now recognizing the value and incorporating similar concepts. Recently, server-side rendering and meta frameworks have gained attention, and SolidJS also has its own meta framework called Solid Start. In this talk, I'll discuss Solid Start and its role in shaping future frameworks. A meta-framework is important because it enables faster time to production, improved code quality, and other benefits. Solid Start is a non-opinionated way to start applications, allowing developers to choose their own path. It took three years to develop, going through two beta phases and major API rewrites. Solid Start is powered by Solid Router, Seroval, Solid, and Vinci. The application allows users to catch Pokemons, and the code uses Solid Router and File Routing for lazy loading components. Preloading data for components helps optimize fetching by eliminating network waterfalls. SOLIDSTART gives you the freedom to choose your path and is the shape of frameworks to come.

1. Solid Start: Shaping Future Frameworks

Short description:

Hello, JS Nation. I'm here to tell you about some interesting stuff I've been working on using SolidJS. SolidJS introduced fine-grain reactivity and signals six years ago, while other frameworks are now recognizing the value and incorporating similar concepts. Recently, server-side rendering and meta frameworks have gained attention, and SolidJS also has its own meta framework called Solid Start. In this talk, I'll discuss Solid Start and its role in shaping future frameworks.

Hello, JS Nation. I hope you're all having an amazing event so far and enjoying this amazing conference. I'm here to tell you a bit about some interesting stuff that I've been working and I've been using and I hope that you find interesting as well.

Well, if we were doing this talk in person, I would ask you three questions. The first one would be, have you ever used SolidJS? The second one, actually the first one would be, have you heard about SolidJS? The second one would be, have you used SolidJS? And the third one would be, have you ever watched or read Dune? Because similarly like the main character, Poltergeist, is in the Dune universe, Solid showed everyone the path six years ago. And this was a path of reactivity, a path of fine-grain reactivity, because this is where we were six years ago when Solid came out.

Now, there's a difference between fine-grain reactivity, which is where Solid was, and coarse-grain reactivity. The difference is, when you have a coarse-grain reactive system, the framework needs to run code to basically find out where updates happen to the UI. Whilst when you have a fine-grain system, the framework doesn't need to run this code. It's powered by this primitive which is called signals, and signals tell the framework that something changed, and therefore allow the framework to be more fine-grained in a sense. So this is where we were six years ago. Now, let's fast forward in time. This is where we are. As you can see, almost everyone saw the value of fine-grain reactivity and the signals, and has pivoted to introducing some sort of level, some sort of signals in their code and in their frameworks.

Now, this was happening something new showed up a couple of three, four years ago, and people started talking about this new thing, which is not a new thing, which has been around for a while, but it hasn't been done in the JavaScript world for a while, or hasn't been actively in the JavaScript world for a while, which is server-side rendering. And everyone was thinking, okay, yeah, server-side rendering, that's pretty interesting, it saves us a bunch of time, we can pivot a bunch of stuff from the client to the servers again. We had done that in the past, how can we start doing it again? Well, personally, I didn't like to be configuring Webpack by myself. One of the easiest ways we could opt in into a different rendering mode was by using a meta framework. And every framework had their own version of a meta framework. So for those of you who are not familiar, meta framework, it's called meta framework because it's a framework built off of a framework. And well, those frameworks had their own meta frameworks, Vue had Nuxt, Angular had Analog, React has Next.js or Remix. And these meta frameworks allowed them to do this thing that we needed, which was server-side rendering, had these multiple rendering modes that you could use.

Now, while this was happening, while this discussion showed up, people started asking the question, okay, what about Solid? Where's Solid meta framework? Well, look, in 2021, Vite 2.0 came out. On that same week, Ryan Carnearo, the creator of Solid.js, started working on the new meta framework for Solid, Solid Start. And that's the title of this talk, Solid Start, the Shape of Frameworks to Come. Before I continue, let me just introduce myself real quickly. My name is Daniel Alfonso, I'm a developer advocate. I'm part of the Solid.js DX team. I'm an instructor at Agileio and you can find me pretty much on any social media, anywhere on the internet at the handle DanielJCAlfonso. Some other stuff about me, well, I released a book called State Management with React Query last year.

2. Exploring Meta-Frameworks and Solid Start

Short description:

I released a course on AGet called An Introduction to the React Testing Library in December. I also released a new course called Get Started with Solid Start. A meta-framework is important because it enables faster time to production, improved code quality, and other benefits. People may have concerns about opinionated meta-frameworks, but the level of opinionation can vary. The router is a crucial component of a meta-framework. Solid Start was released in May and is currently at version 1.06.

It has been around for a year right now, well, time goes by real quick. I released a course on AGet called An Introduction to the React Testing Library in last December. And I actually, it's not on this slide, but I actually just released a new course on Aget called Get Started with Solid Start. So after this talk, if you want to check more about Solid Start, you can scan this QR code here and you'll be able to check all these courses.

One interesting thing about this course, it's free for everyone, so if you want to check it out, please do and give me your feedback. Something else about myself, I've been releasing a newsletter about what's happening on the Solid world every month. So basically, I just compile everything that has been happening, interesting updates from the core team, interesting updates from the ecosystem, interesting stuff found online. So please check these newsletters, also on this QR code, if you want to be updated with the Solid world.

So let's go back to the discussion that we are here to listen. And the question is, why do we need a meta-framework? Why is this important? Because a meta-framework, it's not just about multiple rendering modes. It's not about improved developer experience. It's not just about proper guidelines, deployment adapters and being opinionated. At the end of the day, it's about having a faster time to production. That's why we develop. That's why we are paid to do our works. It's delivered to our users. And obviously, everyone wants it to be faster. So a meta-framework basically encompasses all these things, so at the end of the day, we can have a faster time to production, whilst having more quality in our code and a bunch of other things.

Now, there's one key word here that, well, some people in the JavaScript world can get a bit icky with, and this word is opinionated. Because what happens is when people hear the word opinionated, they start thinking, oh, if I'm opinionated, there's no freedom, because now I'm locked in. Now I cannot change something, because this meta-framework is locking me into something. Something I've learned about the JavaScript world in the past years is that we don't like opinionated. We like to be free. We like to feel like we can have the choice to bring a new library if we want to, to do something that we're struggling with. And when we're talking about a meta-framework, there are stuff that goes from most opinionated to least opinionated. So these are the four things that typically are needed for every meta-framework. We have the router, we have the framework, we have the bundler, and we have the server runtime. And as you can see, the router stands on the top of the most opinionated, because, well, the router can be seen as well as one of the hearts of your meta-framework, and it's the one where the most opinions and the most inventions start with.

Now, let's get back to the question that we started this talk with, which is, what about Solid? Hello? Hello? Hello? This May, Solid Start was released. And now we're currently on the 1.06, if I'm not wrong.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced 2022React Advanced 2022
25 min
A Guide to React Rendering Behavior
Top Content
This transcription provides a brief guide to React rendering behavior. It explains the process of rendering, comparing new and old elements, and the importance of pure rendering without side effects. It also covers topics such as batching and double rendering, optimizing rendering and using context and Redux in React. Overall, it offers valuable insights for developers looking to understand and optimize React rendering.
Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a web framework built on React Router that focuses on web fundamentals, accessibility, performance, and flexibility. It delivers real HTML and SEO benefits, and allows for automatic updating of meta tags and styles. It provides features like login functionality, session management, and error handling. Remix is a server-rendered framework that can enhance sites with JavaScript but doesn't require it for basic functionality. It aims to create quality HTML-driven documents and is flexible for use with different web technologies and stacks.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
The Talk discusses the shift to full-stack frameworks and the challenges of full-stack documentation. It highlights the power of interactive tutorials and the importance of user testing in software development. The Talk also introduces learn.svelte.dev, a platform for learning full-stack tools, and discusses the roadmap for SvelteKit and its documentation.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
Watch video: React Concurrency, Explained
React 18's concurrent rendering, specifically the useTransition hook, optimizes app performance by allowing non-urgent updates to be processed without freezing the UI. However, there are drawbacks such as longer processing time for non-urgent updates and increased CPU usage. The useTransition hook works similarly to throttling or bouncing, making it useful for addressing performance issues caused by multiple small components. Libraries like React Query may require the use of alternative APIs to handle urgent and non-urgent updates effectively.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Suspense is a mechanism for orchestrating asynchronous state changes in JavaScript frameworks. It ensures async consistency in UIs and helps avoid trust erosion and inconsistencies. Suspense boundaries are used to hoist data fetching and create consistency zones based on the user interface. They can handle loading states of multiple resources and control state loading in applications. Suspense can be used for transitions, providing a smoother user experience and allowing prioritization of important content.

Workshops on related topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured WorkshopFree
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
Featured WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
Build Modern Applications Using GraphQL and Javascript
Node Congress 2024Node Congress 2024
152 min
Build Modern Applications Using GraphQL and Javascript
Featured Workshop
Emanuel Scirlet
Miguel Henriques
2 authors
Come and learn how you can supercharge your modern and secure applications using GraphQL and Javascript. In this workshop we will build a GraphQL API and we will demonstrate the benefits of the query language for APIs and what use cases that are fit for it. Basic Javascript knowledge required.
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
WorkshopFree
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
WorkshopFree
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.