8000 react-components/docs/migrations/v6.md at main · zendeskgarden/react-components · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.59 KB

File metadata and controls

39 lines (26 loc) · 1.59 KB

Garden Migration Guide

v6

Breaking Change Details

New versioning strategy

  • Garden React packages are now published under a shared, fixed (common major) version number
  • You are still able to upgrade packages individually
  • This change will help us better communicate changes and allows consumers to better understand the state of their dependencies
  • This is the first release under the new versioning strategy, v6.0.0

New peer dependencies

From v6.0.0 all Garden React libraries now require the following peer dependencies:

react@^16.8.0
react-dom@^16.8.0
styled-components@^4.2.0
@zendeskgarden/react-theming@^6.0.0

React v16 upgrade docs styled-components v4 upgrade docs

Beginning with v4, styled-components now uses the React.forwardRef API.

This means that all existing innerRef, menuRef, buttonRef, etc. props are now replaced with ref.

How to upgrade

  1. Upgrade react and react-dom to latest
  2. Upgrade all Garden dependencies to their most recent, pre v6 versions
  3. Upgrade styled-components and all Garden dependencies to latest
  4. Correct all innerRef, buttonRef, menuRef, etc. usages based on the styled-components v4 upgrade docs

If you have any upgrade questions please create an issue.

0