question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with Preact

See original GitHub issue

Hi, 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:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cristianbotecommented, Jan 21, 2021

😃 happy I could lend a hand! Oh, it’s no problem, that’s how we grow 💪.

1reaction
timolinscommented, Jan 21, 2021

Thank you so much Cristian for figuring this out. Also, sorry for pointing fingers at goober at first. 🙃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found