mandev7724
mandev7724
SSolidJS
Created by mandev7724 on 9/7/2024 in #support
Context Provider in Layout Component for nested routes in a solid start App is undefined
that fixed it, thanks.
8 replies
SSolidJS
Created by mandev7724 on 9/7/2024 in #support
Context Provider in Layout Component for nested routes in a solid start App is undefined
seems like the layout component is rendered on server side, I put some console.log into it and seeing them printed on the terminal.(VS Code)
8 replies
SSolidJS
Created by mandev7724 on 9/7/2024 in #support
Context Provider in Layout Component for nested routes in a solid start App is undefined
but yeah it doesn't work even if i don't de-structure. The issue started appearing once I lifted the context provider up into the layout component. If I move the context provider into the childRoute component, it works fine for other nested children
8 replies
SSolidJS
Created by mandev7724 on 9/7/2024 in #support
Context Provider in Layout Component for nested routes in a solid start App is undefined
sorry it was
const {state, setState} = useContext(AppContext) as AppContextType;
const {state, setState} = useContext(AppContext) as AppContextType;
8 replies