Skip to content

Releases: unadlib/reactant

0.150.0

18 Mar 08:55

Choose a tag to compare

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-share no longer acts as an umbrella barrel
  • Vite-based tree-shaking verification examples were added for reactant-share and 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:

  • reactant
  • data-transport
  • reactant-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.3

or

yarn add react-redux@^8.1.3

Package 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.js imports should be removed
  • undocumented deep imports should be removed
  • reactant-share now enforces an explicit exports surface

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:

  • createRoot
  • hydrateRoot
  • 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:

  • reactant
  • reactant-di
  • reactant-last-action
  • reactant-model
  • reactant-module
  • reactant-redux
  • reactant-router
  • reactant-router-dom
  • reactant-share
  • reactant-ssr
  • reactant-storage
  • reactant-web

Lighter root exports

Several packages now expose lighter helper entrypoints from their roots:

  • reactant-storage now exports getRehydrated
  • reactant-router now exports history and location-change helpers
  • reactant-last-action now 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-treeshaking
  • examples/runtime-vite-treeshaking
  • yarn 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

  1. Upgrade dependency baselines, especially react-redux@8.1.3.
  2. Split all mixed imports from reactant-share.
  3. Remove all reactant-share/compat imports.
  4. Remove deep imports and any hard-coded dist/index.esm.js references.
  5. If needed, replace side-effect-only reactant-di imports with reflect-metadata.
  6. Reinstall dependencies and refresh the lockfile.
  7. Run:
yarn test
yarn build
yarn test:treeshaking

Migration Docs

For detailed migration guidance:

  • website/docs/shared-app/reactant-share-migration-guide.md
  • website/docs/resources/upgrade-guide-react18-and-treeshaking.md

Full Changelog: v0.149.0...v0.150.0

0.149.0

22 Oct 16:52

Choose a tag to compare

What's Changed

Full Changelog: v0.148.0...v0.149.0

0.148.0

23 Sep 01:48

Choose a tag to compare

Full Changelog: v0.147.0...v0.148.0

0.147.0

18 Aug 17:47

Choose a tag to compare

Full Changelog: v0.146.0...v0.147.0

0.146.0

07 Aug 13:59

Choose a tag to compare

Full Changelog: v0.145.0...v0.146.0

0.145.0

05 Aug 16:00

Choose a tag to compare

Full Changelog: v0.144.0...v0.145.0

0.144.0

05 Jun 16:23

Choose a tag to compare

Full Changelog: v0.143.0...v0.144.0

0.143.0

22 May 16:53

Choose a tag to compare

Full Changelog: v0.142.0...v0.143.0

0.142.0

07 May 19:25

Choose a tag to compare

Full Changelog: v0.141.0...v0.142.0

0.141.0

23 Apr 16:44

Choose a tag to compare

Full Changelog: v0.140.0...v0.141.0