Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@loadable/component

gregberge1.5mMIT5.16.4TypeScript support: definitely-typed

React code splitting made easy.

react, ssr, webpack, code-splitting, react-router, server-side-rendering, dynamic-import, react-loadable, react-async-components

readme

@loadable/component

Enable Code Splitting in your React application.

Install

npm install @loadable/component

Documentation

👉 See full documentation

License

MIT

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.16.4 (2024-04-20)

Bug Fixes

5.16.3 (2023-12-26)

Bug Fixes

  • correct react-is for mjs export; remove isValidComponent check (#991) (9d381c3)

5.16.2 (2023-12-15)

Bug Fixes

  • add esm exports to package.json and change esm bundle extension to .mjs to allow node.js to properly import esm version of package. (#989) (e4a3718)

5.15.3 (2023-01-28)

Bug Fixes

  • add React 17 and 18 to package dependencies, fixes #718 (66edc37)

5.15.2 (2021-12-12)

Bug Fixes

  • loadAsync Loadable should copy statics (#839) (9ff6693)
  • use stable promises for load/preload/React (#858) (45f2d91)

5.15.0 (2021-05-08)

Bug Fixes

  • add displayNames to generated components (#731) (b640c82)

Features

5.14.1 (2020-10-22)

Note: Version bump only for package @loadable/component

5.14.0 (2020-10-20)

Bug Fixes

  • do not derive cache key if component is static, fixes #629 (#630) (b4151d8)

Features

5.13.2 (2020-09-14)

Bug Fixes

  • Fixed lazy usage with Suspense and Error Boundary together (#521) (42fbdd0)

5.13.1 (2020-07-02)

Bug Fixes

  • expose used chunkNames from a server. Fixes #587 (831aec0)

5.13.0 (2020-06-29)

Bug Fixes

  • allow webpack cache is ready only for initial chunks, fixes #558 (61f8b75)

Features

  • add resolveComponent option (a47d3d9)

5.12.0 (2020-01-09)

Bug Fixes

  • apply loadable transformations before any other, fixes #466 (ac5ba45)

Features

  • avoid synchronous loading on client if options.ssr is false (#346) (338bf55)

5.11.0 (2019-12-02)

Bug Fixes

5.10.3 (2019-09-24)

Bug Fixes

5.10.2 (2019-07-15)

Bug Fixes

5.10.1 (2019-05-14)

Bug Fixes

5.10.0 (2019-05-13)

Features

Performance Improvements

5.9.0 (2019-04-23)

Features

5.7.0 (2019-03-14)

Bug Fixes

Features

  • use inline JSON to enabling CSP without unsafe-inline (05e5500)

5.6.1 (2019-02-25)

Bug Fixes

  • component: better ES Modules handling (#228) (3628363)
  • suspense: fix suspense mode in React v16.8+ (#251) (d04e1c9)

5.6.0 (2019-02-05)

Features

5.5.0 (2019-01-22)

Note: Version bump only for package @loadable/component

5.2.2 (2018-12-12)

Bug Fixes

  • ensure that component is mounted before calling setState (#184) (fe0f47f), closes #180

5.2.1 (2018-11-27)

Bug Fixes

5.1.2 (2018-11-13)

Bug Fixes

  • fix ref handler in loadable.lib (da05d87)

5.0.0 (2018-11-10)

Bug Fixes

Features

BREAKING CHANGES

    • SSR has been rewritten from scratch, if you use it, please follow the new guide.
  • Prefetch component and prefetch functions have been removed, please use webpackPrefetch instead.

4.0.2 (2018-10-31)

Bug Fixes

  • component: fix lazy usage (d711ee0)

4.0.1 (2018-10-30)

Bug Fixes

  • component: do not call ref several times (8cf3190)

4.0.0 (2018-10-30)

Features

  • add new loadable.lib, change API (94b2e87)

BREAKING CHANGES

    • ErrorComponent is ignored, please use Error Boundaries to handle errors.
  • lazy is no longer exported
  • LoadingComponent is replaced by fallback option
  • ref are now forwarded

3.0.2 (2018-10-30)

Bug Fixes

  • component: fix loadComponent (typo) (a410cb2)

3.0.1 (2018-10-30)

Bug Fixes

  • component: fix loadComponents (bd2220c)

3.0.0 (2018-10-29)

Features

BREAKING CHANGES

  • API has completely changed, see documentation.