fulcro

2025-01-19T17:06:31.207939Z

Hi, I'm playing around with Ant design, and I'd like to know what would be the canonical way of doing the thing you can see in the picture, to have a boolean for setting if the slider should be or not collapsed, something that is triggered in another component, different from the one the sidebar is in. My first thought was to use the DB, having that boolean as a data-only component (anonymous component?) And then use it in all other components, and having a transaction as a way to toggle it, instead of using a useState, because basically all state should live in the normalized DB right? Thanks!

2025-02-02T19:50:45.340629Z

Forgot to say thank you @alex.sheluchin!

🫡 1
sheluchin 2025-01-21T01:28:40.087309Z

I think you have the right idea. Take a look at https://book.fulcrologic.com/#_client_database_naming_conventions. By default, you can use keywords in the ui namespace like :ui/collapse-slider? for things like this to avoid sending it along to the server for a query as this is a UI-only concern.