Releases: solidjs/solid
v0.16.0
Big changes to experimental features:
- New resource API
createResourceandcreateResourceStateto replaceloadResource. These are built to prioritize read capabilities and simplify implementation. - Support for Async SSR
renderToStringnow returns a promise. Uses Suspense to know when it is done. - Progressive Hydration with code splitting support. Ability to track events and replay as hydration completes to reduce "uncanny valley". Components can be lazily loaded even during hydration. No support for async data on hydration yet, so render it from server and load into state synchronously.
- New error boundary api with
onError. If an error occurs in context or child context the nearest handler/s will be called. - Deprecating the
forcesetStatemodifier as it is confusing.
v0.15.0
A lot fixes and new features:
- Suspense improvements:
SuspenseList,useTransition, trigger on read. Update API, and addedreloadand retry capability. Removed need forawaitSuspenseby makingShowandSwitchcontrol flowsSusepnseaware. - Sample all Components. No more fear of nesting Components in JSX expressions. Top level in a Component will always be inert now.
- Support for safe boolean and logical operators. This allows for the same optimization as the
Showcontrol flow for simple inline JSX conditionals like<div>{state.count > 5 && <MyComp />}</div>. - Support for non-curried operator forms. All operators now support an accessor first form as well as the functional curried form. Ex
map(() => state.list, item => item) - Fix issues with spreading over
childrenprops. - Better Type Definitions.
v0.14.0
v0.14.0 brings changes to the render runtime and setState API
- Adds diffing to batched computations to improve update performance
- Supports support for mutable(TypeScript safe)
setStateAPI inspired by Immer. Function setters in Solid now pass a mutable version of state. Modifying will schedule updates. This form must not return a value. It can still be used immutably simply by returning the new value. - Changes how
forceandreconcilehelpers work. They can now be used on nested paths. - Removes support for multi-path
setState.
v0.13.0
v0.13.0 contains large changes to the reactive system and compiler.
The main update is to simplify reactivity by removing computation recycling. While this was a useful feature to avoid unnecessary computation nodes, Solid now uses batching as a different approach to get similar results. Most templating libraries can offer breakneck update speeds without fine-grained updates. The real cost of these top-down approaches is the need to redo structural reconciliation. The current approach is that different computations will be created for each:
- Dynamic insert expression (any expression between tags)
- Spread operator
- JSX template entry point(Top level tag, Fragment, or Component Children)
To aid in performance simple text inserts the textContent binding is now optimized so they can be batched.
In addition, there are some improvements to template cloning and SVG handing in SSR.
v0.12.0
v0.12.0 contains a breaking change to the reactive rendering system
- Removal of explicit dynamic binding
{( )}, bindings will default to reactive unless impossible to be so (literal, function declaration, simple variable) - SVG Camelcase attribute Support
- Prettier now supported!
v0.11.0
v0.11.0 continues to add updates to the reactive system as well as some new features:
- Fix reactivity resolution ordering on downstream conditionals
- Add basic (non-namespaced) SVG support
- Add experimental Server Side Rendering and Client Side Hydration capabilities
- Add Suspense aware control flow transformation (
awaitSuspense) - Allow state objects to track functions
- More TypeScript definition improvements and fixes
v0.10.0
v0.10.0 makes significant changes to the reactive system. Key updates:
- Fixed synchronicity on all hooks/control flows.
- Adds the ability to use comparators on
createMemo. - Fixes bugs with nested control flows.
- Fixes bugs with Suspense.
- Update Suspense
delayMstomaxDurationto match React. (Usage ofmaxDurationstill experimental)
v0.9.0
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
createMemoso 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
mapoperator. I've addedpipeandreduceas 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
insertfromsolid-js/dominstead of just appending the returned element.solid-js/domnow exportsrenderfor convenience which does both theinsertand automatically wraps it withcreateRoot. 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.