Skip to content

Add conditional hooks example - #96

Open
aidenybai wants to merge 1 commit into
mainfrom
codex/conditional-hooks-example
Open

Add conditional hooks example#96
aidenybai wants to merge 1 commit into
mainfrom
codex/conditional-hooks-example

Conversation

@aidenybai

Copy link
Copy Markdown
Owner

Summary

  • add a standalone examples/conditional-hooks workspace without changing Bippy's package API
  • automatically initialize function components with a Vite transform
  • virtualize the full React client hook dispatcher by Fiber and callsite
  • use Bippy's exported useFiber, instrument, onRendererInject, getRDTHook, and Fiber traversal APIs
  • include an interactive state/effect demo and development/production integration coverage

Why

React's native hook list is positional, so skipping a hook changes the meaning of every later slot. This example keeps two stable bootstrap hooks at the start of transformed function components, then stores later hook state by Fiber and callsite. It demonstrates the experiment without adding experimental behavior to Bippy's package surface.

Validation

  • pnpm --filter @bippy/example-conditional-hooks test
  • pnpm --filter @bippy/example-conditional-hooks test:production
  • pnpm --filter @bippy/example-conditional-hooks typecheck
  • pnpm --filter @bippy/example-conditional-hooks build
  • pnpm exec vp check ...
  • git diff --check

@changeset-bot

changeset-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ed2d0ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bippy Ready Ready Preview Aug 15, 2026 11:40pm

@pkg-pr-new

pkg-pr-new Bot commented Aug 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/bippy@96

commit: ed2d0ee

@aidenybai
aidenybai marked this pull request as ready for review August 16, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant