[BUG] useServerMount does not run
See original GitHub issueQwik Version
0.0.23
Operating System (or Browser)
Linux
Node Version (if applicable)
v16.3.0
Which component is affected?
Qwik Runtime
Expected Behaviour
The callback that is passed to useServerMount is executed.
Actual Behaviour
It doesn’t seem to execute the callback.
Additional Information
Reproduction Steps:
- Spin up a new starter with npm init qwik@latest
- Use the standard starter (any server, default options)
- Add the following code to app.tsx under the state declaration:
useServerMount$(() => { console.log("Running server mount"); state.name = "Qwik" });
- npm run dev. The console log is never printed and name is still set as ‘World’
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
useResource$ throws error if executed by track-Function #806
I accidentally was using useServerMount$ in my kanban-board-list . Learning Mix and Match useResource$ and useServerMount$ leads into an error.
Read more >How to Resolve 'Server Service Won't Start' Error in Pro-Watch
This video provides step by step instructions for how to resolve a common 'Windows could not start the Pro-Watch Server service on the...
Read more >How to Fix Error 1053: The Service Did Not ... - YouTube
How to Fix Error 1053: The Service Did Not Respond to the Start or Control Request in a Timely Fashion.When attempting to start, ......
Read more >vscode-qwik-snippets - npm Package Health Analysis - Snyk
useServerMount $() function hook: Hook that executes on the component mount when in a server environment. This is useful because server often has...
Read more >Shai Reznik's Post - qwik #qwiktips - LinkedIn
Today's Qwik Framework tip: Qwik components usually start their execution on the server and then continue on the browser. This means that code...
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
We have an internal discussion in the team about this, by default
npm run dev
is running qwik fully in the browser, no server. So no code runs.should do the trick, we might make it the default option soon!
Fixed by https://github.com/BuilderIO/qwik/pull/586