Carlo Nyte
Carlo Nyte
SSolidJS
Created by pedro00dk on 12/18/2023 in #support
Solid-js router 0.10.x cache invalidation
yea I saw that. I was wondering if we could clear individual caches rather than all of them 🙂
6 replies
SSolidJS
Created by pedro00dk on 12/18/2023 in #support
Solid-js router 0.10.x cache invalidation
Any updates on this?
6 replies
SSolidJS
Created by Carlo Nyte on 6/19/2024 in #support
Context providers inside <Routes> don't provide context values to routed content - Issue #273
K awesome! Thank you
4 replies
SSolidJS
Created by Carlo Nyte on 6/19/2024 in #support
Context providers inside <Routes> don't provide context values to routed content - Issue #273
I guess this is a solution?
const AuthComponent = (props) => {
return (
<I18nProvider namespaces={['auth']}>
{props.children}
</I18nProvider>
)
}
function AuthRoutes = () => {
return <Route path="" component={AuthComponent}>
<Route path=... component=... />
<Route path=... component=... />
<Route path=... component=... />
</Route>
}
const AuthComponent = (props) => {
return (
<I18nProvider namespaces={['auth']}>
{props.children}
</I18nProvider>
)
}
function AuthRoutes = () => {
return <Route path="" component={AuthComponent}>
<Route path=... component=... />
<Route path=... component=... />
<Route path=... component=... />
</Route>
}
It works but it feels wrong for some reason..
4 replies
SSolidJS
Created by Carlo Nyte on 3/28/2024 in #support
Is it possible to get createAsync to revaluate/ refetch data like createResource?
@Birk Skyum Thank you for you're help!
9 replies
SSolidJS
Created by Carlo Nyte on 3/28/2024 in #support
Is it possible to get createAsync to revaluate/ refetch data like createResource?
I ended up not needing to refetch because I could use the data in the ui to get the value I needed. (I was added data to a list and was thinking of using refetch/ revalidate to get the new number of items in the list but its faster just to add the new item to the existing length of list to get the total
9 replies
SSolidJS
Created by Carlo Nyte on 3/28/2024 in #support
Is it possible to get createAsync to revaluate/ refetch data like createResource?
ah it's an actual function got it! Thank you
9 replies
SSolidJS
Created by Carlo Nyte on 3/28/2024 in #support
Is it possible to get createAsync to revaluate/ refetch data like createResource?
I read that but don't understand how or what trigger the revalidate? Would you be able to give me an example?
9 replies
SSolidJS
Created by Carl (klequis) on 3/11/2024 in #support
How to use load property of <Route>
@peerreynders sorry if this is obvious, but is the advantage of using the cache function is that it actually caches the data so that if the user goes back to the page/ component again there won't be another request made to the server?
15 replies
SSolidJS
Created by Carl (klequis) on 3/11/2024 in #support
How to use load property of <Route>
And thank you @klequis for asking the question, I'm currently struggling with this and didn't know the correct way to ask it.
15 replies
SSolidJS
Created by Carl (klequis) on 3/11/2024 in #support
How to use load property of <Route>
Thank you for this!
15 replies
SSolidJS
Created by reed on 11/15/2023 in #support
confused on rendering issue
what was the issue? because I'm currently running into rendering issues with the input file
4 replies
SSolidJS
Created by Miabread on 7/17/2023 in #support
useRouteData returning undefined
Was this ever solved?
20 replies
SSolidJS
Created by Carlo Nyte on 8/31/2023 in #support
Possible Bug with routeData
Got it. I understand now. routeData is a reserved word that works in accordance with useRouteData. I didn't understand that from the documentation. I thought routeData was just random variable name and not something unique. I wonder if there's a way to express that better, or if I'm just an outlier and it's clear to everyone else. In any case, thank you for taking the time to explain it
10 replies
SSolidJS
Created by Carlo Nyte on 8/31/2023 in #support
Possible Bug with routeData
The useMovie(params: any) function that contains createRouteData is used in 3 other components files and does not seem to follow the same practice that is shown in the docs - from what I understand at least
10 replies
SSolidJS
Created by Carlo Nyte on 8/31/2023 in #support
Possible Bug with routeData
Gotcha. What I was trying to do was what i saw done in the Movies example: https://github.com/solidjs/solid-start/tree/main/examples/movies
10 replies
SSolidJS
Created by Carlo Nyte on 8/31/2023 in #support
Possible Bug with routeData
Can you elaborate? I don't really understand
10 replies
SSolidJS
Created by Carlo Nyte on 8/31/2023 in #support
Possible Bug with routeData
// File ComponentA.tsx

import { Show } from "solid-js";
import { useRouteData } from "solid-start";

import { routeData } from "./PersonPage";

export default function PersonPage() {
const personDetails = useRouteData<typeof routeData>();

return (<div>
<Show when= { personDetails() } >
<div>Your favorite color: { personDetails().favoriteColor } </div>
</Show>
</ div>);
}
// File ComponentA.tsx

import { Show } from "solid-js";
import { useRouteData } from "solid-start";

import { routeData } from "./PersonPage";

export default function PersonPage() {
const personDetails = useRouteData<typeof routeData>();

return (<div>
<Show when= { personDetails() } >
<div>Your favorite color: { personDetails().favoriteColor } </div>
</Show>
</ div>);
}
I can get the data from function routeData to work in the componentA in file ComponentA.tsx Which is great! But 1) If I try to move export function routeData({ params }: RouteDataArgs<{id:string}>) into it's own file the code will break. 2) If I change the name of routeData to anything besides routeData the code will break. Neither of which make sense to me
10 replies
SSolidJS
Created by knpwrs on 8/19/2023 in #support
Setting cookies (or headers in general) from `createServerData$`
Thank you for sharing this. I'm currently facing the same issue and thought I was going crazy. I'm still confused why the data from createServerData$ isn't accessible to the component
3 replies
SSolidJS
Created by Carlo Nyte on 7/11/2023 in #support
How to use Context/ ContextProvider with File Routes
Thanks!
10 replies