Releases: unadlib/reactant
0.150.0
Reactant v0.150.0
v0.150.0 is a release focused on two major goals:
- aligning the project with the modern React 18 ecosystem
- making tree shaking reliable across the runtime package graph
This release also tightens package boundaries, updates examples and templates, and adds automated bundle-verification coverage for the new tree-shaking behavior.
Highlights
- React 18 is now the primary tested path for examples, templates, and workspace tooling
- runtime packages now publish preserved-module ESM for more reliable tree shaking
reactant-shareno longer acts as an umbrella barrel- Vite-based tree-shaking verification examples were added for
reactant-shareand the core runtime packages - CI now verifies the tree-shaking regression path
Breaking Changes
reactant-share root imports are now share-only
reactant-share no longer re-exports APIs from:
reactantdata-transportreactant-last-action
If your code previously treated reactant-share as a single umbrella package, you must split those imports by package ownership.
Before:
import {
ViewModule,
injectable,
useConnector,
action,
state,
createSharedApp,
delegate,
createTransport,
LastAction,
} from 'reactant-share';After:
import {
ViewModule,
injectable,
useConnector,
action,
state,
} from 'reactant';
import { createTransport } from 'data-transport';
import { LastAction } from 'reactant-last-action';
import { createSharedApp, delegate } from 'reactant-share';reactant-share/compat was removed
The temporary compatibility entry is no longer supported.
Before:
import {
ViewModule,
injectable,
useConnector,
action,
state,
delegate,
} from 'reactant-share/compat';After:
import {
ViewModule,
injectable,
useConnector,
action,
state,
} from 'reactant';
import { delegate } from 'reactant-share';reactant and reactant-router are aligned to react-redux@8
If your application consumes reactant or reactant-router and is pinned to react-redux@7, you must upgrade to react-redux@8.1.3.
Recommended upgrade:
npm install react-redux@^8.1.3or
yarn add react-redux@^8.1.3Package entrypoints are stricter
Several runtime packages now expose preserved-module ESM via dist/esm/index.js and declare "sideEffects": false.
In practice this means:
- importing from package roots is the supported path
- hard-coded
dist/index.esm.jsimports should be removed - undocumented deep imports should be removed
reactant-sharenow enforces an explicitexportssurface
Supported:
import { createSharedApp, delegate, useLock } from 'reactant-share';Not supported:
import { something } from 'reactant-share/createApp';
import { something } from 'reactant-share/dist/index.esm.js';Edge case: reactant-di side-effect-only usage
reactant-di no longer uses its root entry as a generic reflect-metadata side-effect barrel.
Normal DI usage continues to work, but if your application previously relied on:
import 'reactant-di';only to initialize metadata globally, switch to:
import 'reflect-metadata';Notable Improvements
React 18 support in reactant-web
reactant-web now exports:
createRoothydrateRoot- compatibility
render - compatibility
hydrate
This lets Reactant work correctly with React 18-style mounting while still preserving compatibility helpers.
Tree-shaking-friendly runtime package layout
The following packages now participate in the new ESM publishing model:
reactantreactant-direactant-last-actionreactant-modelreactant-modulereactant-reduxreactant-routerreactant-router-domreactant-sharereactant-ssrreactant-storagereactant-web
Lighter root exports
Several packages now expose lighter helper entrypoints from their roots:
reactant-storagenow exportsgetRehydratedreactant-routernow exports history and location-change helpersreactant-last-actionnow exports its options types from a dedicated lightweight module
reactant-router-dom now owns tree-shake-friendly helpers
generatePath and matchPath are now implemented within reactant-router-dom instead of being directly re-exported from react-router-dom, reducing unnecessary runtime reachability in narrow bundle paths.
Verification
This release adds automated and reproducible tree-shaking verification:
examples/reactant-share-vite-treeshakingexamples/runtime-vite-treeshakingyarn test:treeshaking
These examples were added specifically to verify that narrow imports such as:
import { useLock } from 'reactant-share';do not pull unrelated shared-app runtime code into Vite production bundles.
Upgrade Checklist
- Upgrade dependency baselines, especially
react-redux@8.1.3. - Split all mixed imports from
reactant-share. - Remove all
reactant-share/compatimports. - Remove deep imports and any hard-coded
dist/index.esm.jsreferences. - If needed, replace side-effect-only
reactant-diimports withreflect-metadata. - Reinstall dependencies and refresh the lockfile.
- Run:
yarn test
yarn build
yarn test:treeshakingMigration Docs
For detailed migration guidance:
website/docs/shared-app/reactant-share-migration-guide.mdwebsite/docs/resources/upgrade-guide-react18-and-treeshaking.md
Full Changelog: v0.149.0...v0.150.0
0.149.0
0.148.0
Full Changelog: v0.147.0...v0.148.0
0.147.0
Full Changelog: v0.146.0...v0.147.0
0.146.0
Full Changelog: v0.145.0...v0.146.0
0.145.0
Full Changelog: v0.144.0...v0.145.0
0.144.0
Full Changelog: v0.143.0...v0.144.0
0.143.0
Full Changelog: v0.142.0...v0.143.0
0.142.0
Full Changelog: v0.141.0...v0.142.0
0.141.0
Full Changelog: v0.140.0...v0.141.0