I'd like to use a global state library such as redux or jotai within the admin panel. The goal is to persist specific settings across all views, without saving them to the database. Is this possible?
you can use config.providers if your state manager has a provider
Ah yep, guess that's it. I'll experiment a bit, thanks! 🙂
did you get this working? trying to see if this is straight forward or if i need to bring in zuzstand or pullstate
Hey man, we ended up with a custom provider & jotai. Works pretty well so far, I was actually planning to release a YT video about it in the coming days!
i have finished the custom provider, now i just need to figure out how to access the data in it...
the problem is i need the data in a collect hook, and I think the only way to do that is by creating a custom component.... which seems like too much work
What exactly are you trying to achieve?
Share content between pages, basically call a function in my context from any page without all of my pages being custom. I don’t know where to call the usecontext hook since hooks can only be called in functions
Star
Discord
online
Get dedicated engineering support directly from the Payload team.