Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

solid-js

Package Overview
Dependencies
Maintainers
1
Versions
506
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-js - npm Package Compare versions

Comparing version
2.0.0-beta.13
to
2.0.0-beta.14
+2
-5
CHEATSHEET.md

@@ -219,8 +219,5 @@ # Solid 2.0 — Cheatsheet

// "Refreshing…" indicator (false on the Loading path)
// Pending indicator for this read; participates in Loading like the read itself.
isPending(() => user());
// Render guard: pending read follows the Loading path
isPending(() => user(), true);
// Peek at the in-flight value during a transition

@@ -639,3 +636,3 @@ latest(id);

- **Async lives in computations** — return a Promise/AsyncIterable from `createMemo`/`createStore(fn)`/`createProjection`. Pending reads participate in `<Loading>`.
- **`Loading` covers unresolved branches** — once content has rendered, revalidation keeps it visible. Use `isPending(() => x())` for "refreshing…" indicators, or `isPending(() => x(), true)` when a render guard should follow the Loading path. Use `<Loading on={key}>` to re-show fallback on key changes.
- **`Loading` covers unresolved branches** — once content has rendered, revalidation keeps it visible. Use `isPending(() => x())` for pending indicators or render guards; it reads `x` and participates in Loading like that read. Use `<Loading on={key}>` to re-show fallback on key changes.
- **No `Suspense.Provider` or single error path** — async errors flow to `<Errored>` (or effect `error`); no inline `resource.error` branching.

@@ -642,0 +639,0 @@ - **`createRoot` is owned by parent by default** — disposed when parent disposes. To detach: `runWithOwner(null, fn)`.

@@ -937,3 +937,3 @@ 'use strict';

}
function isPending(fn, loading) {
function isPending(fn) {
try {

@@ -943,3 +943,3 @@ fn();

} catch (err) {
if (!(err instanceof signals.NotReadyError) || loading) throw err;
if (err instanceof signals.NotReadyError) throw err;
return false;

@@ -946,0 +946,0 @@ }

@@ -936,3 +936,3 @@ import { NotReadyError, $REFRESH, merge as merge$1, isWrappable, NoOwnerError, ContextNotFoundError, $PROXY, flatten } from '@solidjs/signals';

}
function isPending(fn, loading) {
function isPending(fn) {
try {

@@ -942,3 +942,3 @@ fn();

} catch (err) {
if (!(err instanceof NotReadyError) || loading) throw err;
if (err instanceof NotReadyError) throw err;
return false;

@@ -945,0 +945,0 @@ }

{
"name": "solid-js",
"description": "Reactive JavaScript library for building user interfaces. Compiles JSX to real DOM with fine-grained signal-based updates — no virtual DOM.",
"version": "2.0.0-beta.13",
"version": "2.0.0-beta.14",
"author": "Ryan Carniato",

@@ -110,3 +110,3 @@ "license": "MIT",

"dependencies": {
"@solidjs/signals": "^2.0.0-beta.13",
"@solidjs/signals": "^2.0.0-beta.14",
"csstype": "^3.1.0",

@@ -113,0 +113,0 @@ "seroval": "~1.5.0",

export { $PROXY, $REFRESH, $TRACK, action, createOwner, createReaction, createRevealOrder, createRoot, createTrackedEffect, deep, flatten, flush, getNextChildId, getObserver, getOwner, isDisposed, isEqual, isRefreshing, isPending, isWrappable, mapArray, merge, omit, onCleanup, onSettled, latest, reconcile, refresh, repeat, resolve, NotReadyError, runWithOwner, enableExternalSource, enforceLoadingBoundary, snapshot, storePath, untrack } from "@solidjs/signals";
export type { Accessor, ComputeFunction, EffectBundle, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, MemoOptions, NoInfer, NotWrappable, Omit, Owner, ProjectionOptions, Refreshable, Signal, SignalOptions, SourceAccessor, Setter, Store, StoreOptions, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter } from "@solidjs/signals";
export type { Accessor, ComputeFunction, EffectBundle, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, MemoOptions, NoInfer, NotWrappable, Omit, Owner, ProjectionOptions, Refreshable, Signal, SignalOptions, SourceAccessor, Setter, Store, StoreReturn, ProjectionStoreReturn, StoreOptions, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter } from "@solidjs/signals";
export { $DEVCOMP, children, createContext, useContext } from "./client/core.cjs";

@@ -4,0 +4,0 @@ export type { ChildrenReturn, Context, ContextProviderComponent, ResolvedChildren, ResolvedElement } from "./client/core.cjs";

@@ -126,3 +126,3 @@ import { $REFRESH } from "@solidjs/signals";

export declare function resolve<T>(fn: () => T): Promise<T>;
export declare function isPending(fn: () => any, loading?: boolean): boolean;
export declare function isPending(fn: () => any): boolean;
export declare function latest<T>(fn: () => T): T;

@@ -129,0 +129,0 @@ export declare function isRefreshing(): boolean;

export { $PROXY, $REFRESH, $TRACK, action, createOwner, createReaction, createRevealOrder, createRoot, createTrackedEffect, deep, flatten, flush, getNextChildId, getObserver, getOwner, isDisposed, isEqual, isRefreshing, isPending, isWrappable, mapArray, merge, omit, onCleanup, onSettled, latest, reconcile, refresh, repeat, resolve, NotReadyError, runWithOwner, enableExternalSource, enforceLoadingBoundary, snapshot, storePath, untrack } from "@solidjs/signals";
export type { Accessor, ComputeFunction, EffectBundle, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, MemoOptions, NoInfer, NotWrappable, Omit, Owner, ProjectionOptions, Refreshable, Signal, SignalOptions, SourceAccessor, Setter, Store, StoreOptions, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter } from "@solidjs/signals";
export type { Accessor, ComputeFunction, EffectBundle, EffectFunction, EffectOptions, ExternalSource, ExternalSourceConfig, ExternalSourceFactory, Merge, MemoOptions, NoInfer, NotWrappable, Omit, Owner, ProjectionOptions, Refreshable, Signal, SignalOptions, SourceAccessor, Setter, Store, StoreReturn, ProjectionStoreReturn, StoreOptions, SolidStore, StoreNode, StoreSetter, StorePathRange, ArrayFilterFn, CustomPartial, Part, PathSetter } from "@solidjs/signals";
export { $DEVCOMP, children, createContext, useContext } from "./client/core.js";

@@ -4,0 +4,0 @@ export type { ChildrenReturn, Context, ContextProviderComponent, ResolvedChildren, ResolvedElement } from "./client/core.js";

@@ -126,3 +126,3 @@ import { $REFRESH } from "@solidjs/signals";

export declare function resolve<T>(fn: () => T): Promise<T>;
export declare function isPending(fn: () => any, loading?: boolean): boolean;
export declare function isPending(fn: () => any): boolean;
export declare function latest<T>(fn: () => T): T;

@@ -129,0 +129,0 @@ export declare function isRefreshing(): boolean;