fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.58k stars 692 forks source link

Getting Error when using in React Project #945

Closed vinodonweb closed 1 year ago

vinodonweb commented 1 year ago

Do you want to request a feature or report a bug?

What is the current behavior? getting This error:

react.development.js:209 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app

Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:

What is the expected behavior?

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? version: 18

vinodonweb commented 1 year ago

error solved, throwing error because of not include

tshegofatso01 commented 1 year ago

hI @vinodonweb , how did you fix it, I'm having a similar error, I can't find a solution

vinodonweb commented 1 year ago

Juat make sure that, you're closing the tag. It will work after that