|
| 1 | +--- |
| 2 | +"@stackflow/react": major |
| 3 | +--- |
| 4 | + |
| 5 | +Promote Future API to default entry point — `@stackflow/react` v2 |
| 6 | + |
| 7 | +**Entry point / sub-paths** |
| 8 | +- `@stackflow/react/future` and `@stackflow/react/stable` sub-paths removed. Import from `@stackflow/react` directly. |
| 9 | + |
| 10 | +**`stackflow()` signature** |
| 11 | +- Input: `StackflowOptions<T extends BaseActivities>` (`{ activities, transitionDuration }`) → `StackflowInput<T, R>` (`{ config, components }`) |
| 12 | +- Output: `StackflowOutput<T>` (generic) → `StackflowOutput` — final shape: `{ Stack, actions, stepActions }` |
| 13 | +- Removed from output: `activities`, `useFlow`, `useStepFlow`, `addActivity`, `addPlugin` |
| 14 | +- Added to output: `stepActions` |
| 15 | + |
| 16 | +**Hooks / Actions** |
| 17 | +- `useActions()` removed → use `useFlow()` (direct import from `@stackflow/react`) |
| 18 | +- `useStepActions()` removed → use `useStepFlow()` (direct import from `@stackflow/react`) |
| 19 | +- `useActiveEffect()`, `useEnterDoneEffect()`, `useStep()` removed |
| 20 | +- `stackflow().actions` now exposes only `push`, `replace`, `pop` — `getStack()` and `dispatchEvent()` removed |
| 21 | +- Step actions moved to `stackflow().stepActions`; renamed: `stepPush` → `pushStep`, `stepReplace` → `replaceStep`, `stepPop` → `popStep` |
| 22 | + |
| 23 | +**Type generics** |
| 24 | +- `useActivityParams<{ key: string }>()` → `useActivityParams<"ActivityName">()` (activity name string literal; type inferred from `@stackflow/config` Register) |
| 25 | +- `ActivityComponentType<{ title: string }>` → `ActivityComponentType<"ActivityName">`. Previous params-object API renamed to `ActivityComponentTypeByParams` |
| 26 | +- `__internal__` directory removed; shared utilities inlined |
| 27 | + |
| 28 | +**New default exports** |
| 29 | +- `useLoaderData()`, `useConfig()`, `usePrepare()`, `lazy()`, `structuredActivityComponent()` now available as direct imports |
0 commit comments