caseybaggz
caseybaggz
SSolidJS
Created by caseybaggz on 3/22/2024 in #support
submit form without reloading
That definitely works but there is still a caveat that because it's an action it re-triggers any createResource .
15 replies
SSolidJS
Created by caseybaggz on 3/22/2024 in #support
submit form without reloading
Oh, interesting. throw void 0 looks like what i want exacly but how strange of a code read? Maybe I'll PR a new interface that is something like skipRevalidate or something? 🤔
15 replies
SSolidJS
Created by caseybaggz on 3/22/2024 in #support
submit form without reloading
OK - so you can use form just use the onSubmit and preventDefault with no action to not auto-reload the route.
15 replies
SSolidJS
Created by caseybaggz on 3/22/2024 in #support
submit form without reloading
I'm literally just doing what is on the README. But, I guess this was more about the philosophy of when to use form and actions in each use case? So, I've noticed if I don't use them, the route doesn't reload, so I'm guessing that when you want the magic of dynamically updating everything without having to keep track of it (like on a server) - then form/actions are your friend. But, when you need to keep a client side store and not refresh everything (i.e. realtime usage) - they are not your friend. I'm still guessing this is in response to the update in the Router to utilize the native form element? Maybe I'm missing something though?
15 replies
SSolidJS
Created by caseybaggz on 3/22/2024 in #support
submit form without reloading
revalidate doesn't seem to do anything as I've tried it every way I can think of? 🤷‍♀️
15 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
I cannot outside of the example I have because it is a private code base
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Yeah, the code comes in chunks and not streaming. I feel like I read somewhere that signals defer for performance which I think it is the reason. The reproduction doesn't work fine though - should be loading very quickly at every 200ms (or whatever I put) but instead loads slower.
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Not sure how to really reproduce this since openAI is using an actual fetch stream (not the same as just faking it) but this is kind of what it is doing - but it still doesn't explain why the real deal logs fine in an effect but doesn't update in the rendered JSX like the example does? https://stackblitz.com/edit/solidjs-templates-3g8e9e?file=src%2FApp.tsx
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Oh, I wonder if I need to do something with this? 🤔 https://docs.solidjs.com/reference/rendering/render-to-stream
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Client
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Vanilla Solid
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Right. I guess what I'm asking is if there is anything particular in the signal/store logic that prevents streaming updates? I can log all day and it works but the UI will never re-render the signal even though an effect will log it correctly. So, I'm assuming there is something deeper in the "fine grain" details on the Solid side that is not so compatible with streaming updates?
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
But wouldn't that defeat the purpose? If I remove the open ai stuff it's just an effect and signal update?
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Then in the JSX, using stream() only updates the first item on the stream and never again.
26 replies
SSolidJS
Created by caseybaggz on 3/14/2024 in #support
Does streaming work in SolidJS with signals?
Basically, doing this:
createEffect(() => {
if (data()?.run) {
data()
?.run.on('textCreated', () => {
// Assistant begins typing...
setAssistantPending(false);
})
.on('textDelta', (textDelta, snapshot) => {
setStream((prev) => prev + textDelta.value);
})
.on('textDone', (text) => {
// Assistant has finished typing...
setThread(
produce((state) => {
state.messages.push({
id: state.messages.length,
role: 'assistant',
value: text.value,
});
})
);
updateScrollView();
});
});
createEffect(() => {
if (data()?.run) {
data()
?.run.on('textCreated', () => {
// Assistant begins typing...
setAssistantPending(false);
})
.on('textDelta', (textDelta, snapshot) => {
setStream((prev) => prev + textDelta.value);
})
.on('textDone', (text) => {
// Assistant has finished typing...
setThread(
produce((state) => {
state.messages.push({
id: state.messages.length,
role: 'assistant',
value: text.value,
});
})
);
updateScrollView();
});
});
26 replies
SSolidJS
Created by caseybaggz on 8/22/2023 in #support
Panda CSS and Solid-Start = FOUC
Here's a deploy preview combining the results of: - Importing the module (inline) of the styles - Preloading them via a static path and Link - Inlining the module via Style https://deploy-preview-176--virtualdnd.netlify.app/
2 replies
SSolidJS
Created by TorHammare on 7/17/2023 in #support
Store for binary tree object
@torhammare so, I think you might want to use something like Dynamic, but either way - both are control flow components: https://www.solidjs.com/tutorial/flow_dynamic?solved
6 replies
SSolidJS
Created by TorHammare on 7/17/2023 in #support
Store for binary tree object
I would adjust the store so you could utilize the Match component which will be a better design than storing a component within a state-based store.
6 replies