Skip to content

Commit 90a0cf7

Browse files
authored
docs(MigrationGuide): add note about ui5wc enums (#6272)
1 parent b52a2fe commit 90a0cf7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/MigrationGuide.mdx

+18
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,24 @@ npx @ui5/webcomponents-react-cli codemod --transform v2 \
5757

5858
The minimum required `react` and `react-dom` version is now `18.0.0`.
5959

60+
### UI5 Web Components Enums are no longer exported
61+
62+
Previously, we created enums for all props that used multiple string values to set the corresponding design, mode, etc. Since enums for web components have been exported directly by UI5 Web Components for some time, we had been proxying the imports to avoid breaking changes.
63+
64+
With version 2, we took the opportunity to remove all proxied enums, so they must now be imported directly from `@ui5/webcomponents` or the corresponding package.
65+
66+
**Note:** You can use our [Codemod](#codemod) to simplify the refactoring process.
67+
68+
For example:
69+
70+
```js
71+
// v1
72+
import { ButtonDesign } from '@ui5/webcomponents-react';
73+
74+
// v2
75+
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
76+
```
77+
6078
### Removed `react-jss`
6179

6280
UI5 Web Components for React is no longer relying on `react-jss` internally, hence the dependency is now removed and the `react-jss` ThemeProvider is no longer rendered as part of our `ThemeProvider`.

0 commit comments

Comments
 (0)