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
Cannot create Input element because:
• Either undefined [1] is incompatible with null [2] in property current of property ref.
• Or a call signature declaring the expected parameter / return type is missing in object type [3] but exists in
function type [4] in property ref.
• Or object type [5] is not a React component.
src/App.js
22│ render() {
23│ const Input = styled("input", {});
24│ return (
25│ <Input ref={this.ref} onChange={() => console.log(this.ref.current)} />
26│ );
27│ }
28│ }
/private/tmp/flow/flowlib_289644ca/react.js
[4] 197│ | ((React$ElementRef<ElementType> | null) => mixed)
:
[3][2] 246│ ): {|current: null | T|};
node_modules/styletron-react/src/types.js
[1][5] 48│ export type StyletronComponent<Props> = StatelessFunctionalComponent<Props> & {
49│ __STYLETRON__: any,
50│ };
The text was updated successfully, but these errors were encountered:
Flow errors when trying to pass a ref to a styled component.
Here is the flow error output:
The text was updated successfully, but these errors were encountered: