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 concurrent mode throws this error #9

Closed
NawarA opened this issue Feb 9, 2020 · 4 comments
Closed

React concurrent mode throws this error #9

NawarA opened this issue Feb 9, 2020 · 4 comments

Comments

@NawarA
Copy link

NawarA commented Feb 9, 2020

Expected ref to be a function, a string, an object returned by React.createRef(), or null.

I believe its coming React.cloneElement

@leMaik
Copy link
Member

leMaik commented Feb 9, 2020

we don't use refs in our code, so I guess it's an issue in your code.

@NawarA
Copy link
Author

NawarA commented Feb 9, 2020

My bad. I was passing a reference to the SVG Icon, instead of an instantiated icon, so the React.cloneElement was throwing. Looks good in Concurrent mode actually!

Btw, love the library. Would love to see this added MUI's official code base, as everyone should use your lib

@NawarA NawarA closed this as completed Feb 9, 2020
@leMaik
Copy link
Member

leMaik commented Feb 10, 2020

@NawarA I'm not sure if this component would be approved into Material-UI. It usually depends on demand, e.g. many people needed a rating component so one was included in Material-UI (although there were some community components).

@NawarA
Copy link
Author

NawarA commented Feb 11, 2020

There is an open issue and feature request to add simple animations to material design. Your lib is the start of that :)

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