PROBLEM - random string inserted to the page automatically
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior? getting random letters when activating toastify, number changing randomly everytime I call the toastify
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: `class ThankYou extends Component {
render() {
return (
<React.Fragment>
{toast.warn("We'll be in touch!")}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
// newestOnTop={false}
closeOnClick
rtl={false}
pauseOnVisibilityChange
draggable
pauseOnHover/>
</React.Fragment>
);
}
}`
the code render is in another component with a simple state change toggle
What is the expected behavior? just a notification
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Random string HTML escape issue, when using special chars
It's really impossible to help you if your'e not showing the problematic code. I'm going to guess you're concatenating this random string into ......
Read more >I have created a trigger, which generate's a random string ...
I have created a trigger, which generate's a random string, Please can any one help in writing the test class? · Normal test...
Read more >Why does ASP.NET insert these random strings inside my html?
For instance, in my razor file I write this: @foreach(var item in Model){ Some data with @item } The html outputted…
Read more >Too complicated code for generating a random string?
In particular I want to generate a random string of given letters, say std.ascii.letters. Anybody a simpler version than auto randomString ...
Read more >Random String Generator using JavaScript - GeeksforGeeks
We can generate the random string in 2 ways ie., either we can iterate the loop for the specified length of the character...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @dvash999,
You are calling
js {toast.warn("We'll be in touch!")}
inside the render method,toast
return thetoastId
this is why you get the id rendered.You should trigger the toast from an action. If you want to display the toast when the user click on the send button, you can do it as follow for example.
I need to do with JS thing
{toast.warn("We'll be in touch!")}
. How can I achieve it without showing toastId?