or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

built-in-components.mdcaching.mdchildren.mdcomponents.mdcomposition.mdcontext.mddevelopment.mdelements.mdexperimental.mdhooks-context.mdhooks-effects.mdhooks-imperative.mdhooks-performance.mdhooks-state.mdhooks-transitions.mdindex.mdrefs.mdtransitions.md
tile.json

built-in-components.mddocs/

Built-in Components

Special components: Fragment, StrictMode, Suspense, Profiler.

Fragment

Render multiple children without a wrapper.

const Fragment: ComponentType<{ children?: ReactNode; key?: Key }>;
// Long form
<Fragment><Child1 /><Child2 /></Fragment>

// Short syntax
<><Child1 /><Child2 /></>

// With key (required when mapping)
{todos.map(todo => (
  <Fragment key={todo.id}>
    <Title>{todo.title}</Title>
    <Body>{todo.body}</Body>
  </Fragment>
))}

StrictMode

Development checks for its descendants.

const StrictMode: ComponentType<{ children?: ReactNode }>;
<StrictMode>
  <App />  {/* Detects unsafe lifecycles, unexpected side effects, etc. */}
</StrictMode>

Suspense

Declarative loading states.

const Suspense: ComponentType<{ children?: ReactNode; fallback?: ReactNode }>;
<Suspense fallback={<Loader />}>
  <LazyComponent />
</Suspense>

// Nested boundaries
<Suspense fallback={<AppShell />}>
  <Nav />
  <Suspense fallback={<ContentSkeleton />}>
    <MainContent />
  </Suspense>
</Suspense>

Profiler

Performance monitoring.

const Profiler: ComponentType<{
  id: string;
  onRender?: (id, phase, actualDuration, baseDuration, startTime, commitTime) => void;
  children?: ReactNode;
}>;
<Profiler id="App" onRender={(id, phase, duration) => {
  console.log(`${id} took ${duration}ms`);
}}>
  <App />
</Profiler>