Closed xiaoxiangmoe closed 4 years ago
Yeah, that seems like a good call 👍
fwiw i think a year ago @ferdaber said that the readonly is going to be applied from the @types/react
side - not sure if that actually happened
For class components I believe they are already read only.
For function component, readonly is needed.
What should I do now?
this PR is probably fine as-is, the updates on the React typings side can come later.
I'm not merging any PRs on this repo (content is frozen in preparation for archiving - see #1313) but when we flip the switch, I'll port over PRs to the v2 site
So for now, you can do nothing
These two tutorials now redirect to the typescript pages on the tool's side - so I can't reapply any of this to the v2 site. Thanks for the PR though!
see https://reactjs.org/docs/components-and-props.html#props-are-read-only