Open dnguneratne opened 1 year ago
Library works great when used as part of a React project. However, is it possible to import this library as a plain browser script resource as well? I tried using a bundled file from unpkg but ran into the following error.
What is the current behavior? Console error on the browser:
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: To reproduce: Copy,
<script src="https://unpkg.com/react-toastify@9.0.8/dist/react-toastify.umd.js"></script>
, at the end of HTML body tag.What is the expected behavior? react-toastify to work when imported as a script.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? Chrome v110.0.5481.100
hey! did you find a solution or did you give up? because no response & fix from the developer @dnguneratne
Hey @Quarsee could you try with https://unpkg.com/react-toastify@10.0.0-beta.1/dist/react-toastify.umd.js
to see if the issue persist ?
@fkhadra Right now I am facing with toast is not defined I also tried container version out there I got ToastContainer is not defined.
Library works great when used as part of a React project. However, is it possible to import this library as a plain browser script resource as well? I tried using a bundled file from unpkg but ran into the following error.
What is the current behavior? Console error on the browser:![image](https://user-images.githubusercontent.com/8231763/227302913-2209ef00-d48b-4ee2-9eb7-e765176389e7.png)
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: To reproduce: Copy,
<script src="https://unpkg.com/react-toastify@9.0.8/dist/react-toastify.umd.js"></script>
, at the end of HTML body tag.What is the expected behavior? react-toastify to work when imported as a script.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? Chrome v110.0.5481.100