Nin
Explore posts from serversNavigate user in login/logout functions
I'm trying to make it generic to send my users either to the main page or to the login page when they either login or logout but I'm having trouble doing this in a generic way.
This is my Auth Provider for example, I would like to add to the login/logout sessions a redirect.
I've tried to use
useNavigate
but get the error it should be wrapped in a <Router />
, I've tried using return <Navigate href="/" />
but this doesn't work either. Anyone able to help me out here?5 replies
How to mutate a createResource storage
Hi all, I'd like to get some help with mutating a store that is set as a createResource storage.
Given the above snippet, I can access my store regularly by running resource() this returns the contents of my store, but how can I mutate it? Mutate only accepts one argument and usually setStore would receive multiple.
18 replies
createResource State gets updated without directly doing so
I have a createResource function which retrieves data from a database, in the same function, I'm extracting a set of data and calling setState for an already existing object called selectedTasks.
Later on in my page I'm updating the state of the selectedTasks with a checkbox, however this appears to also be updating my createResource resource. Very confused!
This is my handleCheckboxChange
2 replies
Sentry in Solid / Vercel
Would anyone be able to assist with setting up Sentry in my Vercel deployment that hosts Solid? Releases are being created, commits are being seen, it's just that sourceMaps are not being uploaded (automatically).
Looking forward to some help!
1 replies
Rerender child component with updated props
I've built a pagination component that takes a prop called
totalPages
, I've created a signal for this as I only know the totalPages once my createResource is done loading. However, the child component does not rerender when totalPages is updated. How do I make the component update itself?
Parent Code
34 replies
Pagination Component
Hi all, I'm a beginning developer so bear with me while I go through these noob mistakes. I'm trying to utilize a React component called rc-pagination however when I follow their example my page stops loading and I get an error.
I'm basically looking for an easy way to start using a proper pagination component similar to what Ant Design offers.
The one I tried implementing: https://pagination-react-component.vercel.app/demo/more#more
The error I'm facing after I've inserted my pagination component:
I'll happily use a different library which could create a similar experience.
11 replies