solid-js 2.0.0-beta.13 → 2.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHEATSHEET.md CHANGED
@@ -216,12 +216,9 @@ const rest = omit(props, "class", "style"); // replaces splitProps
216
216
  const user = createMemo(() => fetchUser(id()));
217
217
  // Reading user() suspends until ready; wrap in <Loading>.
218
218
 
219
- // "Refreshing…" indicator (false on the Loading path)
219
+ // Pending indicator for this read; participates in Loading like the read itself.
220
220
  isPending(() => user());
221
221
 
222
- // Render guard: pending read follows the Loading path
223
- isPending(() => user(), true);
224
-
225
222
  // Peek at the in-flight value during a transition
226
223
  latest(id);
227
224
 
@@ -635,7 +632,7 @@ If your training data is 1.x, these are the corrections. **Read this before gene
635
632
  - **Stores: setters take a draft callback** — mutate the draft in place by default. Returning a new value is shallow (array index-replace, object top-level diff); reach for it for filter/remove. Keyed reconcile is a _projection-fn_ feature, not a setter feature.
636
633
  - **`undefined` is a real value in `merge`** — it overrides rather than "skip this key".
637
634
  - **Async lives in computations** — return a Promise/AsyncIterable from `createMemo`/`createStore(fn)`/`createProjection`. Pending reads participate in `<Loading>`.
638
- - **`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.
635
+ - **`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.
639
636
  - **No `Suspense.Provider` or single error path** — async errors flow to `<Errored>` (or effect `error`); no inline `resource.error` branching.
640
637
  - **`createRoot` is owned by parent by default** — disposed when parent disposes. To detach: `runWithOwner(null, fn)`.
641
638
  - **Refs are functions** — `ref={el => ...}`. No `useRef`-style ref objects. Compose with arrays: `ref={[a, b]}`.
package/dist/server.cjs CHANGED
@@ -934,12 +934,12 @@ function flush() {}
934
934
  function resolve(fn) {
935
935
  throw new Error("resolve is not implemented on the server");
936
936
  }
937
- function isPending(fn, loading) {
937
+ function isPending(fn) {
938
938
  try {
939
939
  fn();
940
940
  return false;
941
941
  } catch (err) {
942
- if (!(err instanceof signals.NotReadyError) || loading) throw err;
942
+ if (err instanceof signals.NotReadyError) throw err;
943
943
  return false;
944
944
  }
945
945
  }
package/dist/server.js CHANGED
@@ -933,12 +933,12 @@ function flush() {}
933
933
  function resolve(fn) {
934
934
  throw new Error("resolve is not implemented on the server");
935
935
  }
936
- function isPending(fn, loading) {
936
+ function isPending(fn) {
937
937
  try {
938
938
  fn();
939
939
  return false;
940
940
  } catch (err) {
941
- if (!(err instanceof NotReadyError) || loading) throw err;
941
+ if (err instanceof NotReadyError) throw err;
942
942
  return false;
943
943
  }
944
944
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "Reactive JavaScript library for building user interfaces. Compiles JSX to real DOM with fine-grained signal-based updates — no virtual DOM.",
4
- "version": "2.0.0-beta.13",
4
+ "version": "2.0.0-beta.14",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -107,7 +107,7 @@
107
107
  "performance"
108
108
  ],
109
109
  "dependencies": {
110
- "@solidjs/signals": "^2.0.0-beta.13",
110
+ "@solidjs/signals": "^2.0.0-beta.14",
111
111
  "csstype": "^3.1.0",
112
112
  "seroval": "~1.5.0",
113
113
  "seroval-plugins": "~1.5.0"
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  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";
2
- 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";
2
+ 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";
3
3
  export { $DEVCOMP, children, createContext, useContext } from "./client/core.js";
4
4
  export type { ChildrenReturn, Context, ContextProviderComponent, ResolvedChildren, ResolvedElement } from "./client/core.js";
5
5
  export * from "./client/component.js";
@@ -123,7 +123,7 @@ export declare function createRevealOrder<T>(fn: () => T, _options?: {
123
123
  export declare function untrack<T>(fn: () => T): T;
124
124
  export declare function flush(): void;
125
125
  export declare function resolve<T>(fn: () => T): Promise<T>;
126
- export declare function isPending(fn: () => any, loading?: boolean): boolean;
126
+ export declare function isPending(fn: () => any): boolean;
127
127
  export declare function latest<T>(fn: () => T): T;
128
128
  export declare function isRefreshing(): boolean;
129
129
  export declare function refresh<T>(_target: Refreshable<T>): void;
@@ -1,5 +1,5 @@
1
1
  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";
2
- 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";
2
+ 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";
3
3
  export { $DEVCOMP, children, createContext, useContext } from "./client/core.cjs";
4
4
  export type { ChildrenReturn, Context, ContextProviderComponent, ResolvedChildren, ResolvedElement } from "./client/core.cjs";
5
5
  export * from "./client/component.cjs";
@@ -123,7 +123,7 @@ export declare function createRevealOrder<T>(fn: () => T, _options?: {
123
123
  export declare function untrack<T>(fn: () => T): T;
124
124
  export declare function flush(): void;
125
125
  export declare function resolve<T>(fn: () => T): Promise<T>;
126
- export declare function isPending(fn: () => any, loading?: boolean): boolean;
126
+ export declare function isPending(fn: () => any): boolean;
127
127
  export declare function latest<T>(fn: () => T): T;
128
128
  export declare function isRefreshing(): boolean;
129
129
  export declare function refresh<T>(_target: Refreshable<T>): void;