Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[react-jss] innerRef prop incompatible with React.createRef #935

Closed
bamaboy opened this issue Dec 12, 2018 · 1 comment
Closed

[react-jss] innerRef prop incompatible with React.createRef #935

bamaboy opened this issue Dec 12, 2018 · 1 comment

Comments

@bamaboy
Copy link

bamaboy commented Dec 12, 2018

Expected behavior:
innerRef takes React.createRef() as valid propType.

Describe the bug:
I am using react 16 refs api, and passing ref to styled component. But since React.createRef() returns an object, and component's prop innerRef expected to be function, propTypes warning occurs.

Failed prop type: Invalid prop `innerRef` of type `object` supplied to `Jss(TabPicker)`, expected `function`.

Versions (please complete the following information):

  • jss: latest
@kof
Copy link
Member

kof commented Dec 12, 2018

innerRef was designed before createRef api existed. Stay tuned for the version 10 release #795

@kof kof closed this as completed Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants