Available Codemods
This page outlines the available codemods for migrating from KendoReact v10.0.0 to each version up until the latest.
Starting with KendoReact 11, some component packages now provide codemods to help you migrate between major versions. For more details, check out Assisted Migration.
KendoReact v10.0.0 to v11.0.0
Quick Guide
To migrate a specific KendoReact package from v10.0.0 to v11.0.0, run the following command in your project root:
npx @progress/kendo-cli migrate @progress/kendo-react-<package-name> --from=10 --to=11
If not already installed, you will be prompted to install the Kendo CLI when running this command for the first time.
This command will check for available updates for the specified package and its peer dependencies that are already present in the project, prompt you to install them, and apply all relevant codemods.
Best Practices
For a more manageable migration process, consider the following recommended practices:
- Migrate between consecutive major versions. For example, migrate from v10 to v11. This lets you review and adjust your code version by version, avoiding possible conflicts between breaking changes.
- Migrate one package at a time. This provides finer control over the migration process.
Data Grid
# Migrate to the latest available package version.
npx @progress/kendo-cli migrate @progress/kendo-react-grid
# Or migrate from v10 to v11.
npx @progress/kendo-cli migrate @progress/kendo-react-grid --from=10 --to=11
All Data Grid codemods perform the following:
- Find all KendoReact Grid components in your code. The transformations recognize custom import names as well.
- Handle both class and functional components.
- Preserve your existing code.
- Add missing imports.
The following table outlines the specific Data Grid codemod transformations:
| Codemod | Description |
|---|---|
New custom cell | Migrates from the deprecated cellRender prop to the new cells prop:
|
New custom column cell | Migrates from the deprecated cell prop to the new cells prop:
|
New custom column filter cell | Migrates from the deprecated filterCell prop to the new cells prop:
|
New custom column footer cell | Migrates from the deprecated footerCell prop to the new cells prop:
|
New custom column header cell | Migrates from the deprecated headerCell prop to the new cells prop:
|
New detail expand state mechanism | Migrates from the deprecated onExpandChange event handler to the new controlled component pattern using the detailExpand state and the onDetailExpandChange event handler:
|
New edit state mechanism | Migrates from the deprecated editField prop to the new controlled component pattern using the edit state and event handlers:
|
New custom filter cell | Migrates from the deprecated filterCellRender prop to the new cells prop:
|
New group expand state mechanism | Migrates from the deprecated onExpandChange event handler to the new controlled component pattern using groupExpand state and onGroupExpandChange event handlers.
|
New custom header cell | Migrates from the deprecated headerCellRender prop to the new cells prop:
|
New custom row | Migrates from the deprecated rowRender prop to the new rows prop:
|
New selection state mechanism | Migrates from the deprecated selectedField prop to the new controlled component pattern using select state and onSelectionChange event handlers.
|
Date Inputs
# Migrate to the latest available package version.
npx @progress/kendo-cli migrate @progress/kendo-react-dateinputs
# Or migrate from v10 to v11.
npx @progress/kendo-cli migrate @progress/kendo-react-dateinputs --from=10 --to=11
The following table outlines the specific Date Inputs codemod transformations:
| Codemod | Description |
|---|---|
New DateInputHandle type | (TypeScript-only) Migrates type annotations from the deprecated DateInput type to the new DateInputHandle type. |
New DatePickerHandle type | (TypeScript-only) Migrates type annotations from the deprecated DatePicker type to the new DatePickerHandle type. |
Dialogs
# Migrate to the latest available package version.
npx @progress/kendo-cli migrate @progress/kendo-react-dialogs
# Or migrate from v10 to v11.
npx @progress/kendo-cli migrate @progress/kendo-react-dialogs --from=10 --to=11
The following table outlines the specific Dialogs codemod transformations:
| Codemod | Description |
|---|---|
New DialogHandle type | (TypeScript-only) Migrates type annotations from the deprecated Dialog type to the new DialogHandle type. |
New WindowHandle type | (TypeScript-only) Migrates type annotations from the deprecated Window type to the new WindowHandle type. |
TreeList
# Migrate to the latest available package version.
npx @progress/kendo-cli migrate @progress/kendo-react-treelist
# Or migrate from v10 to v11.
npx @progress/kendo-cli migrate @progress/kendo-react-treelist --from=10 --to=11
The following table outlines the specific TreeList codemod transformations:
| Codemod | Description |
|---|---|
New custom cell | Migrates from the deprecated cellRender prop to the new cells prop:
|
New custom column cell | Migrates from the deprecated cell prop to the new cells prop:
|
New custom column filter cell | Migrates from the deprecated filterCell prop to the new cells prop:
|
New custom column footer cell | Migrates from the deprecated footerCell prop to the new cells prop:
|
New custom column header cell | Migrates from the deprecated headerCell prop to the new cells prop:
|
New edit state mechanism | Migrates from the deprecated editField prop to the new controlled component pattern using the edit state and event handlers:
|
New expand state mechanism | Migrates from the deprecated onExpandChange event handler to the new controlled component pattern using the expand state and the onExpandChange event handler:
|
New custom filter cell | Migrates from the deprecated filterCellRender prop to the new cells prop:
|
New custom header cell | Migrates from the deprecated headerCellRender prop to the new cells prop:
|
KendoReact v11.0.0 to v12.0.0
Quick Guide
To migrate a specific KendoReact package from v11.0.0 to v12.0.0, run the following command in your project root:
npx @progress/kendo-cli migrate @progress/kendo-react-<package-name> --from=11 --to=12
If not already installed, you will be prompted to install the Kendo CLI when running this command for the first time.
This command will check for available updates for the specified package and its peer dependencies that are already present in the project, prompt you to install them, and apply all relevant codemods.
Best Practices
For a more manageable migration process, consider the following recommended practices:
- Migrate between consecutive major versions. For example, migrate from v11 to v12. This lets you review and adjust your code version by version, avoiding possible conflicts between breaking changes.
- Migrate one package at a time. This provides finer control over the migration process.
Chat
# Migrate to the latest available package version.
npx @progress/kendo-cli migrate @progress/kendo-react-conversational-ui
# Or migrate from v11 to v12.
npx @progress/kendo-cli migrate @progress/kendo-react-conversational-ui --from=11 --to=12
All Chat codemods perform the following:
- Find all KendoReact Chat components in your code. The transformations recognize custom import names as well.
- Preserve your existing code.
The following table outlines the specific Chat codemod transformations:
| Codemod | Description |
|---|---|
New onSendMessage handler | Renames onMessageSend to onSendMessage. |
New authorId attribute | Replaces user attribute with authorId, including lifting inline objects to variables if necessary. |
New messageTemplate attribute | Renames message attribute to messageTemplate. |
New ChatSendMessageEvent type | (TypeScript-only) Replaces type annotations from the deprecated ChatMessageSendEvent type to the new ChatSendMessageEvent type. |
Deprecated toolbar attributes |
|