github solidjs/solid v0.20.0
V0.20.0

latest releases: v1.8.16, v1.8.15, v1.8.14...
3 years ago

Re-scheduling Reactivity.

This release makes large changes to the Reactive System. Key changes are deferring createEffect to be after rendering and introducing createComputed do immediate reactive graph updates like loading async data.

Concurrency

In addition, the reactive model brings updates to Suspense and Transitions. Solid now has true concurrent rendering at a granular level. This mechanism does differ from React as it currently only supports a single future.

createSelector

New API to do delegated selection. Good for updating only the rows that change in large lists:

const [selected, setSelected] = createSignal();
const isSelected = createSelector(selected);

return <For each={list()}>{
  item => <li class={isSelected(item.id) ? "selected" : ""}>{item.text}</li>
}</For>

This will only re-evaluate the class binding when the value equals the id passed in or if the previous value was that id. So 100 rows and only 2 executions (remove old, and set new). Optionally takes a comparison function so you can do things like multi-select as well.

as prop in Styled Components

Let's you override the element type in the view where used.

Removed APIs

afterEffects, createDependentEffect, and suspend have been removed as they no longer make sense with the new reactive system timing.

Don't miss a new solid release

NewReleases is sending notifications on new releases.