SolidJS for NativeScript
Repo nativescript-community/solid-js, read from GitHub 9 h ago. nativescript-community has not joined Take My Repo.
polyfill queueMicrotask when the runtime lacks it 17
Solid 2 schedules every update with queueMicrotask. NativeScript Preview's runtime doesn't define it, so Solid 2 apps (e.g. https://nativescript.new/solid) failed on first render with ReferenceError: queueMicrotask is not defined. The polyfill is installed only when the global is missing; runtimes that provide it keep their native implementation. Errors thrown in a callback are still reported.
Full changelog: v2.0.0...v2.0.1
Solid 2.0 support for NativeScript. Requires solid-js 2.x; stay on 0.1.x for Solid 1.8–1.9.
solid-js@^2.0.0, @solidjs/universal@^2.0.0, and @solidjs/babel-plugin@^2.0.0. babel-preset-solid is no longer used.
npm install @nativescript-community/solid-js@^2 solid-js@^2 @solidjs/universal@^2 npm install -D @solidjs/babel-plugin@^2 npm uninstall babel-preset-solid solid-refresh
@solidjs/universal; solid-js/universal no longer exists in Solid 2.use is no longer exported. Solid 2 removed use: directives; pass a ref instead, e.g. ref={myDirective(options)}. Refs can be arrays.spread() drops its isSVG argument, and effect() takes Solid 2's two-phase (compute, apply) form. Both only matter if you call the renderer directly.solid-refresh. It has no Solid 2 release; NativeScript's own HMR still replaces modules.For, Repeat, Show, Switch, Match, Loading, Reveal, Errored.ref and applyRef exports for Solid 2's compiled refs.createElement applies the static props the compiler hoists.nativescript.webpack.js compiles with @solidjs/babel-plugin (generate: 'universal', hydratable: false).solid-js, @solidjs/signals, and @solidjs/universal are pinned to their browser bundles. Solid 2 resolves the node condition to its SSR build, which renders once and never updates.@NativeClass transform loads typescript only when it runs, so JavaScript-only apps build without it.See the README's Upgrading from Solid 1.x section. In short: Suspense → Loading, ErrorBoundary → Errored, SuspenseList → Reveal, <Index> → <For keyed={false}>, onMount → onSettled, and solid-js/store is merged into solid-js. Event handlers keep the on: / oncapture: prefixes.
Full changelog: v0.1.2...v2.0.0 (#16)
Full Changelog: https://github.com/nativescript-community/solid-js/commits/v0.0.7