Closed
Description
With react and flow, it's very common to type props like this:
type Props = {
prop1: string,
prop2: number
};
However this makes it possible to write to the props object, like this: this.props.prop1 = 'foo'
which is to be avoided.
To force this with flow, the solution is to use covariant properties:
type Props = {
+prop1: string,
+prop2: number
};
It would be useful to have an eslint rule to force this pattern.