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.

how i can use hot-loader for Preact?

See original GitHub issue

situation:

function Popup(){
  const [state, setState] = useState(false)

  function openPopup(){ setState(true) }

  return <div>
    <button onClick={openPopup}>Open</button>

    {state && <div className='popup'>
      My Popup
    </div>}

  </div>
}
  1. I want open popup
  2. then i want change text My Popup to My Popup!!! and press ctrl + s
  3. text must change, but popup should not close

Now I am doing this with react + react-hot-loader, how can this be do this with preact?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
JoviDeCroockcommented, May 3, 2020

Work for a hot-reloader for Preact is being done here it’s experimental for now.

2reactions
marvinhagemeistercommented, May 3, 2020

We’re working on that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

preact-hot-loader - npm
Start using preact-hot-loader in your project by running `npm i ... Note: You can safely install react-hot-loader as a regular dependency ...
Read more >
How to use the react-hot-loader.preact function in react-hot-loader ...
To help you get started, we've selected a few react-hot-loader.preact examples, based on popular ways it is used in public projects.
Read more >
Switching to Preact (from React)
Switching to Preact can be as easy as installing and aliasing ... A common use-case for preact-compat is to support React-compatible third-party modules....
Read more >
Preact vs React Engine vs React Hot Loader | What are the ...
Preact is an attempt to recreate the core value proposition of React (or similar libraries like Mithril) using as little code as possible,...
Read more >
Browsersync, Webpack + Preact Hot Loader Example
Browsersync, Webpack + Preact Hot Loader Example.
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