kfap
kfap
SSolidJS
Created by kfap on 12/12/2024 in #support
How to do Dark Theme (shadcn-solid + Vite + Tauri)
https://github.com/aramrw/mangashelfv2 can someone tell me how I could add a dark theme? https://shadcn-solid.com/docs/dark-mode can I not do this with a config based router? https://github.com/aramrw/mangashelfv2/blob/master/src/index.tsx not sure becuase I dont use solidstart
1 replies
SSolidJS
Created by kfap on 11/5/2024 in #support
mutate & refetch not causing a re render
const [mainParentFolder] = createResource(folderPath, get_os_folder_by_path);

const [osVideos, { mutate }] = createResource(
() => mainParentFolder() ? mainParentFolder()?.path : null,
get_os_videos
);
const [mainParentFolder] = createResource(folderPath, get_os_folder_by_path);

const [osVideos, { mutate }] = createResource(
() => mainParentFolder() ? mainParentFolder()?.path : null,
get_os_videos
);
onClick={() => {
let newVideo = structuredClone(video);
newVideo.watched = !video.watched;

update_os_videos([newVideo]).then(() => {
mutate((videos) => {
return videos?.map((vid) => vid.path === newVideo.path ? newVideo : vid) || [];
});
});
}}
onClick={() => {
let newVideo = structuredClone(video);
newVideo.watched = !video.watched;

update_os_videos([newVideo]).then(() => {
mutate((videos) => {
return videos?.map((vid) => vid.path === newVideo.path ? newVideo : vid) || [];
});
});
}}
I tried using both refetch & mutate and they both don't re-render. The video does get updated too when I reload the page its correct
1 replies