Skip to content

v0.7.0

Compare
Choose a tag to compare
@ryansolid ryansolid released this 25 May 11:00

v0.7.0 brings further improvements in tree shaking, Context API including Provide control flow, and suspense helpers for loading Async Components and Data. Introducing:

  • lazy: use this to lazy import Components
  • loadResource: use this to fetch any async source
  • createContext: to register a Context type to be use with Provide and useContext
  • useContext to use a context provided via the Provide control flow
  • setDefaults: sets default props for your components

There is also performance improvements where the number extraneous placeholder DOM nodes has been reduced improving cloning and traversal time.

This is a breaking change as in order to support this version, Solid has forked S.js the underlying library and now ships with it built in. This means Solid will no longer be compatible other S.js libraries. It is a turning point but enables the powerful new features.

In terms of API there is also a breaking change, where if you wish to specify dependencies for an effect use createDependentEffect. createEffect now has the same signature as createMemo where the second argument is a default value.