Skip to content

Commit

Permalink
Add note about connect prop codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
sydneyjodon-wk committed Oct 23, 2024
1 parent baacf1e commit d47eb79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/null_safety/null_safe_migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ This codemod will:
See our [prop requiredness and nullability](#prop-requiredness-and-nullability) docs for more details on whether you should keep them required following the migration.
- All non-initialized state fields will have optional nullable hints.
- Add nullable hints for callback ref types.
- Add annotations to disable required prop validation for `connect` props. See [`connect` required props migration case](#wrapper-and-connected-components-and-required-props) for more info.

#### Required props codemod

Expand Down Expand Up @@ -210,7 +211,7 @@ of the null safety and required props docs for instructions on how to handle the

For connect, either:
- Disable validation using the instructions linked above
- Note: for now, this must be done manually, but we'll be adding a codemod to help do this automatically for `connect`: https://github.com/Workiva/over_react_codemod/issues/295
- Note: The [null safety migrator companion codemod](#companion-codemod) does this automatically for all `connect` props.
- Refactor your component to instead utilize [OverReact Redux hooks](../over_react_redux_documentation.md#hooks),
which avoid this problem by accessing store data and dispatchers directly in the component as opposed to passing it in via props.

Expand Down

0 comments on commit d47eb79

Please sign in to comment.