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
The ToggleButton component throws an error when being rendered:
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
Description
When using the ToggleButton component, an error is thrown when rendering it (see error above). The issue appears to possibly be related to how the react-toggle import is defined. See http://aaronshaf.github.io/react-toggle/ for details regarding how it should be imported (specifically, the name of the import should be Toggle instead of ReactToggle it appears).
🔬 Steps to Reproduce
Simply using the ToggleButton component leads to this error being thrown when rendered.
I tested straight use of react-toggle and it works as expected when I import the library following their guidance in the documentation linked above.
🔥 Exception or Error
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
🌍 Your Environment
Version:
"react": "^16.14.0",
"react-dom": "^16.14.0",
Anything else relevant?
The text was updated successfully, but these errors were encountered:
Still works well when I import it from react-components. Should be easily fixed by changing the way it's imported. Please see aaronshaf/react-toggle#97
🐞 bug report
The ToggleButton component throws an error when being rendered:
Description
When using the
ToggleButton
component, an error is thrown when rendering it (see error above). The issue appears to possibly be related to how thereact-toggle
import is defined. See http://aaronshaf.github.io/react-toggle/ for details regarding how it should be imported (specifically, the name of the import should beToggle
instead ofReactToggle
it appears).🔬 Steps to Reproduce
Simply using the
ToggleButton
component leads to this error being thrown when rendered.I tested straight use of
react-toggle
and it works as expected when I import the library following their guidance in the documentation linked above.🔥 Exception or Error
🌍 Your Environment
Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: