You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/null_safety/null_safe_migration.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ dart pub global run over_react_codemod:null_safety_migrator_companion --yes-to-a
52
52
53
53
This codemod will:
54
54
- Add nullability hints to state mixin/class fields
55
-
- These hints will cause defaulted/initialized values to be migrated as "late required".
55
+
- These hints will cause defaulted/initialized values to be migrated as "late required" (the same thing is done for props in the [required props codemod](#required-props-codemod)).
56
56
See our [prop requiredness and nullability](#prop-requiredness-and-nullability) docs for more details on whether you should keep them required following the migration.
57
57
- All non-initialized state fields will have optional nullable hints.
58
58
- Add nullable hints for callback ref types.
@@ -66,7 +66,9 @@ as a separate commit before proceeding with the rest of the migration.
66
66
This is a two-step process involving two sub-commands:
67
67
68
68
1.`null_safety_required_props collect` - Collects requiredness data for all OverReact props based on usages in the specified packages and all their transitive dependencies.
69
-
1.`null_safety_required_props codemod` - Adds null safety migrator hints to OverReact props using prop requiredness data from 'collect' command.
69
+
1.`null_safety_required_props codemod` - Adds null safety migrator hints to OverReact props taking into account:
70
+
1. Prop requiredness data from the 'collect' command.
71
+
1. If the prop has a default in `defaultProps`, it will get "late required" hints.
70
72
71
73
Start with the `collect` command, following its help output for instructions:
0 commit comments