Abrinzer
Abrinzer
SSolidJS
Created by Abrinzer on 1/7/2024 in #support
Make sure your app is wrapped in a <Router />
I have a mini app which contains its own route path something like below . This root component is exported out and is being used in main app as a package dependency. Below is the usage mini-app code
<Route path="/path1" component={MainLayout}>
<Route path="/" element={<Navigate href='/home'/>}/>
<Route path="/home" component={() => <div>Hi</div>} />
</Route>
<Route path="/path1" component={MainLayout}>
<Route path="/" element={<Navigate href='/home'/>}/>
<Route path="/home" component={() => <div>Hi</div>} />
</Route>
In the main app usage looks like below
<Router>
<Routes>
<Route path="/" component={MainLayout}>
<Route path="/account" component={Account} />
<Route path="/bills" component={Bills} />
<MiniApp />
</Route>
</Routes>
</Router>
<Router>
<Routes>
<Route path="/" component={MainLayout}>
<Route path="/account" component={Account} />
<Route path="/bills" component={Bills} />
<MiniApp />
</Route>
</Routes>
</Router>
27 replies
SSolidJS
Created by Abrinzer on 9/13/2023 in #support
How can I achieve server side rendering in solid
is solid start ready for production usage
3 replies
SSolidJS
Created by Abrinzer on 7/9/2023 in #support
memoized debounce
I want to memoize my debounced function but unfortunately it's not working. Can someone tell whats wrong.
memo(() => debounce(getData?.refetch, 500))
memo(() => debounce(getData?.refetch, 500))
3 replies
SSolidJS
Created by Abrinzer on 6/22/2023 in #support
how to add debounce to any signal setter ?
I have use case where my my signal is getting called multiple times which is fine as per the implementation. But what I want is to debounce that seignal setter so that it is call in deferred manner and its fine if few calls are missed.
11 replies
SSolidJS
Created by Abrinzer on 6/16/2023 in #support
Solid Testing Library
Guys , I have a function which has some signal and store updation inside it and I call this function by Clicking a button. Whenever I am doing userEvent click on the button my signal is not updating. I have to manually update the signal like below .
createRoot((dispose) => {
setSingal({ list: Array(5).fill(0)});
dispose();
});
userEvent.click(results.getByTestId("button-id"));
createRoot((dispose) => {
setSingal({ list: Array(5).fill(0)});
dispose();
});
userEvent.click(results.getByTestId("button-id"));
3 replies
SSolidJS
Created by Abrinzer on 4/21/2023 in #support
CreateEffect in a separate JS file
One of my component is having too many createEffects which looks quite messed up and cumbersome. I want to refactor it and keep those in a separate files. What are the possible ways to do it ? Would appreciate your help!
2 replies
SSolidJS
Created by Abrinzer on 4/14/2023 in #support
My app breaks when there is any javascript error.
I am aware of ErrorBoundary but my concern is why the whole app just crashes whenever there is any js error. I have never seen this kind of pattern in other frameworks. Ideally what should happen is just that particular component where error has occurred should stop working (functionality ) rest of the app should work I should be able to navigate between screens etc.
6 replies
SSolidJS
Created by Abrinzer on 2/28/2023 in #support
How to implement dangerously set innerHTML (which is there in react) in solid
I want to use render string HTML into the DOM. What are the best ways to do it?
3 replies
SSolidJS
Created by Abrinzer on 2/25/2023 in #support
Possible to use routeData outside a component ?
I want to use RouteData outside JSX. is it possible to do that ?
1 replies
SSolidJS
Created by Abrinzer on 2/20/2023 in #support
delay execution of createEffect.
I have a use case where I want one of my createEffect to be called before another . Currently they are called one after the other. I want to swap the executing sequence.
16 replies
SSolidJS
Created by Abrinzer on 1/29/2023 in #support
Trigger same API call with different payloads in parallel using CreateResource
I am facing issues with making same API call multiple times with different payloads (using ForEach). I am setting a payload within the store at each iteration and that store proxy is used as a dependency of fetcher function inside createResource export const TriggerAPI = () => { const [dummy] = createResource(getPayload, fetcher); return dummy; }; getPayload is return values from store. I verified that it is updating each time in loop but API is triggering only once. Can someone help what should be the ideal way to handle it
12 replies