API Reference
Flick consists of four main packages:
Packages
@flickjs/runtime
The core reactive runtime. Includes:
fx()- Create reactive staterun()- Run side effectsmount()- Mount components to the DOMSuspense- Async boundary componentquery()- Async data fetchinglazy()- Code splitting
@flickjs/router
File-based routing for Flick. Includes:
Router- Main router componentLink- Navigation link componentnavigate()- Programmatic navigationcurrentPath()- Current routeparams()- Route params
@flickjs/vite-plugin
Vite plugin for Flick JSX compilation. Handles all build-time transformation.
@flickjs/compiler
Babel plugin for JSX transformation. Used internally by the vite plugin.
Installation
bash
# Core runtime (required)
bun add @flickjs/runtime
# Vite plugin (required for JSX)
bun add -D @flickjs/vite-plugin
# Router (optional)
bun add @flickjs/router