Does not work with Preact
See original GitHub issueHi, I was trying out the plugin and the basic ‘Getting Started’ code fails to launch the toast for me.
I verified that the component renders properly, but it seems like the toast
function is failing silently. Is there a way to turn on debug/error messages so that I can figure out what’s going on?
Here’s the full code I used for reference:
import React from 'react';
import toast, { Toaster } from 'react-hot-toast';
const notify = () => toast('Here is your toast.');
const App = () => {
return (
<div>
<button onClick={notify}>Make me a toast</button>
<Toaster />
</div>
);
};
export default App;
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Issues · preactjs/preact - GitHub
Issues list ; Typescript: input property indeterminate is not typed. #3836 opened yesterday ; Infinite loop when using Headless UI Radio Group with...
Read more >Switching to Preact (from React)
While Preact strives to be API-compatible with React, portions of the interface are intentionally not included. The most noteworthy of these is createClass()...
Read more >Differences to React - Preact
The main difference between Preact and React is that Preact does not implement a synthetic event system for size and performance reasons. Preact...
Read more >Switching to Preact (from React)
Everything you need to know to switch from React to Preact.
Read more >Web Components | Preact
In Preact, web components work just like other DOM Elements. They can be ... JSX does not provide a way to differentiate between...
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
😃 happy I could lend a hand! Oh, it’s no problem, that’s how we grow 💪.
Thank you so much Cristian for figuring this out. Also, sorry for pointing fingers at goober at first. 🙃