CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-react

React is a JavaScript library for building user interfaces through a declarative, component-based approach.

Pending
Overview
Eval results
Files

experimental.mddocs/

Experimental APIs

Warning: Use with caution - may change or be unavailable.

Activity

State preservation across navigations.

const Activity: ComponentType<{
  mode?: "hidden" | "visible";
  name?: string;
  children?: ReactNode;
}>;
<Activity mode="visible" name="chat">
  <ChatRoom />
</Activity>

unstable_useCacheRefresh

Refresh cache entries.

function unstable_useCacheRefresh(): <T>(fn?: () => T, seed?: T) => void;
const refresh = unstable_useCacheRefresh();
refresh(getUser, userId);  // Refresh specific cache

Server-Only Taint APIs

Prevent sensitive data from leaking to client.

function experimental_taintUniqueValue(message: string | undefined, lifetime: object, value: string | bigint | ArrayBufferView): void;
function experimental_taintObjectReference(message: string | undefined, object: object | Function): void;
function unstable_postpone(reason: string): void;
// Prevent API key leakage
experimental_taintUniqueValue('API key secret', user, user.apiKey);

// Prevent object leakage
experimental_taintObjectReference('Config secret', config);

// Postpone rendering
if (!data.ready) unstable_postpone('Data not ready');

Note: Many experimental APIs are disabled by default in published builds.

Install with Tessl CLI

npx tessl i tessl/npm-react

docs

built-in-components.md

caching.md

children.md

components.md

composition.md

context.md

development.md

elements.md

experimental.md

hooks-context.md

hooks-effects.md

hooks-imperative.md

hooks-performance.md

hooks-state.md

hooks-transitions.md

index.md

refs.md

transitions.md

tile.json