-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just get "Connected, listening for Preact operations" #299
Comments
Thanks for filing a bug report. By default the devtools will filter out anything that isn't a component. In the snippet above we only render DOM nodes. The devtools doesn't receive any messages because they've been filtered out, so it assumes that nothing was sent. Adding a component somewhere makes it show up in devtools: <!DOCTYPE html>
<html>
<body>
<div id="app"></div>
<script type="module">
import "https://cdn.skypack.dev/preact/debug";
import { h, Component, render } from "https://cdn.skypack.dev/preact";
import htm from "https://cdn.skypack.dev/htm";
const html = htm.bind(h);
- const app = html`<h1>Hello World!</h1>`;
+ const App = () => html`<h1>Hello World!</h1>`;
- render(app, document.getElementById("app"));
+ render(html`<${App} />`, document.getElementById("app"));
</script>
</body>
</html> I'm leaving this open as we should be able to print a better message there. Something that hints to the user that the active filters leads to no nodes being shown. |
Thanks for the clarification! What I'm actually trying to do is use Preact with microbundle and I somehow wasn't including "preact/debug" in the correct way. I've now done it as follows: // microbundle entry point
export * from "preact/debug";
export * from "preact";
export * from "htm/preact";
... // my app's entry point
import { html, render } from "./preact-bundle.js";
... And it's working fine. |
Using the sample code from this comment, running on
light-server
localhost.In both Chrome and Firefox (with uBlock disabled), I get the following message:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: