This page summarizes the public package entrypoints.
Use subpaths for feature-specific imports.
Common runtime exports:
state()derive()selector()defineContext()readContext()getSignal()- JSX runtime exports:
jsx,jsxs, andFragment
Public types:
StateStateSetterStateTupleDerivedSelectorContextPropsThe shared runtime props bag stays intentionally generic. Intrinsic JSX elements layer common DOM-style contracts such asclass,style,ref, and high-use event handlers on top of it, and the JSX runtime gives high-use tags likea,button,form,input,label,select,option, andtextareaplus common layout/content tags such asdiv,span,section,main,article,header,footer,nav,p, and headings, along with common semantic inline/content tags such asblockquote,code,em,figure,figcaption,pre,small, andstrong, plus list, table, output, and common SVG tags such asul,li,ol,table,caption,thead,tbody,tfoot,tr,td,th,output,svg,g,circle,rect,path, andtitle, their own attribute contracts, including table-cell props such ascolSpan,rowSpan,headers,scope, andabbr, output props such ashtmlFor,name, andform, and SVG props such asviewBox,strokeWidth,strokeLinecap,strokeLinejoin,fillRule, andclipRule. Compatibility props such asclassName,htmlFor, and those common camelCase SVG props are normalized to their rendered attribute names.
@askrjs/askr/boot- app startup and lifecycle helpers such ascreateIsland,createIslands,createSPA,hydrateSPA,cleanupApp, andhasApp@askrjs/askr/components-ErrorBoundary@askrjs/askr/control- JSX control-flow helpers@askrjs/askr/data-createQuery,createMutation, andinvalidate@askrjs/askr/resources- async resource helpers such asresource,on,timer,task,capture, andgetSignal, plus the current placeholderstreamsurface@askrjs/askr/router- route registration, routing state, and navigation helpers@askrjs/askr/fx- timing and scheduling helpers@askrjs/askr/ssr- server-side rendering helpers@askrjs/askr/ssg- static-site generation helpers@askrjs/askr/foundations- slim structural primitives such aslayout,Slot,Presence,definePortal,DefaultPortal, andPortal@askrjs/askr/foundations/structures- structural registries and layering helpers such ascreateCollectionandcreateLayer@askrjs/askr/foundations/utilities- prop composition and ID helpers@askrjs/askr/foundations/interactions- interaction-policy helpers@askrjs/askr/foundations/state- controllable-state helpers@askrjs/askr/foundations/icon- icon contract helpers@askrjs/askr/jsx-runtime- JSX factory exports@askrjs/askr/jsx-dev-runtime- JSX development runtime exports
import { derive, state } from '@askrjs/askr';
const [count, setCount] = state(0);
const doubled = derive(() => count() * 2);
setCount((value) => value + 1);import { createSPA } from '@askrjs/askr/boot';
import { getManifest, registerRoutes, route } from '@askrjs/askr/router';
registerRoutes(() => {
route('/', () => <Home />);
route('/about', () => <About />);
});
await createSPA({ root: document.body, manifest: getManifest() });- Move startup helpers like
createIsland,createIslands,createSPA,hydrateSPA,cleanupApp, andhasAppto@askrjs/askr/boot. - Move
ErrorBoundaryto@askrjs/askr/components. - Move
createQuery,createMutation, andinvalidateto@askrjs/askr/data. - Move
createCollectionandcreateLayerto@askrjs/askr/foundations/structures. - Use the dedicated
@askrjs/askr/foundations/*subpaths for utilities, interactions, state, and icon helpers.
For,Show,Case, andMatchare available from@askrjs/askr/control.Showrender-function children receive the resolved truthy value, and literal falsey branches are excluded from that callback type when TypeScript can see them.Context.Scopeaccepts normal renderable children or a zero-argument render callback. Imperative DOMNodechildren are not part of that public contract.ErrorBoundaryfallbacks accept normal JSX boundary content, and the client runtime also allows an imperative DOMNodefallback when you need one.Link,layout,Slot,Presence, and the default portal surfaces accept normal renderable child content. Imperative DOMNodechildren are not part of that public contract.- Router page components,
lazy()route components, and router layout functions also return normal renderable content rather than imperative DOMNodevalues. createQuery()exposesconsistencyplusstaleReasonso settled stale states can be narrowed intoinconsistent,aborted, orerrorwithout guessing from broad booleans alone.resource()is available from@askrjs/askr/resources.createStaticGen()is available from@askrjs/askr/ssg.