github solidjs/solid v0.9.0

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

This is a big one. It includes the Control Flow Refactor described in #42. It brings Solid up to date with the latest version JSX DOM Expressions. Read the release notes here. What this means:

  • Optimized List reconciliation is exposed for any array passed as child nodes. This includes Fragments which are now also just arrays. This addresses issues like #37. One side effect is that dynamic bindings are not activated until attached and are made inert when detached. If you need to maintain context I suggest wrapping in a createMemo so that the value is remembered between inserts.
  • Solid ships with Control Flow operators. However, you are not limited to them. While you should be conscious of wasted work, you can use any Components/functions to handle control flow. The control flow operators are much simpler now since they are independent of DOM manipulation.
  • To support purely Reactive array iteration I reintroduced the map operator. I've added pipe and reduce as well. These are very basic but can serve as a basis for users to create Functional operators. They are in the same vein as RxJS pipe-able operators.
  • The return type from JSX may be a Node, Function, or Array of those. Since not all JSX expressions return Nodes anymore the top level now needs to use insert from solid-js/dom instead of just appending the returned element. solid-js/dom now exports render for convenience which does both the insert and automatically wraps it with createRoot. This syntax is based on React's render.
  • While still not perfect, some big improvements to TypeScript support, by removing both Custom Directives (use forwardRef binding instead) and <$> tag. New Control Flow also now has explicit type defs. JSX Children are now handled consistently with react.
  • Newly released is also babel-preset-solid. This will take care of all the Solid specific configuration for the JSX plugin making it easier than ever to get started.

There have been several small changes, but those are the highlights. Bear with me as I update all the examples over the next few days.

Don't miss a new solid release

NewReleases is sending notifications on new releases.