florian
florian
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
that's pretty weird
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
For me this will make the build fail: 1. init basic example with javascript and npm i 2. npm i vinxi 3. add
import {getCookie} from "vinxi/http";
import {getCookie} from "vinxi/http";
to src/routes/about.jsx 4. run npm run build
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
I will try to cook up a small example from the solid start basic template
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
No description
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
and tbh making files that contain logic run on the server "use server" makes me feel more safe of accidentally sharing secrets on the client or stuff like that
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
it looks like you can't import any vinxi functions in files like these or the build tool will complain like here
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
the problem with only putting "use server" only in the function itself is that the vinxi build issues are coming back then
32 replies
SSolidJS
Created by florian on 6/8/2024 in #support
Run route.load and access return value only once when navigating to page
It seems like this solved all my issues I'm having right now. Thanks @Brendonovich and @peerreynders for your help!
17 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
thanks for your help @mdynnl 🙏
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
atm its not really clear how to handle stuff like this properly
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
the docs should get updated to include advise like this tbh
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
so basically like you said haha
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
No description
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
and imo if I only use certain functions on the server then it shouldn't try to build them for the browser in the first place
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
No description
32 replies
SSolidJS
Created by florian on 6/9/2024 in #support
Split server code from client code
can't really do that for files where I put my actions in as I'm experiencing other bugs then unfortunately (see here: https://discord.com/channels/722131463138705510/1249053112925425664/1249390490340692069)
32 replies
SSolidJS
Created by florian on 6/8/2024 in #support
Run route.load and access return value only once when navigating to page
at least if it isn't a route where I'm doing that
17 replies
SSolidJS
Created by florian on 6/8/2024 in #support
Run route.load and access return value only once when navigating to page
Don't know if this is intentionally designed to not work like setting "use server" on each function but it kinda sounds like it should work the same in the docs tbh https://docs.solidjs.com/solid-start/reference/server/use-server
17 replies
SSolidJS
Created by florian on 6/8/2024 in #support
Run route.load and access return value only once when navigating to page
Tried to find the issue starting with the basic example and adding stuff over slowly and it looks like because I import the server functions like getEmail from a seperate file it doesn't work, specifically because I made the whole file "use server" instead of each funcion specifically
17 replies
SSolidJS
Created by florian on 6/8/2024 in #support
Run route.load and access return value only once when navigating to page
No description
17 replies