This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-30
Channels
- # announcements (1)
- # babashka (15)
- # calva (3)
- # cider (1)
- # clj-kondo (16)
- # clj-on-windows (1)
- # cljfx (1)
- # clojure (25)
- # clojure-europe (6)
- # clojure-spec (15)
- # cursive (13)
- # emacs (11)
- # fulcro (2)
- # humbleui (7)
- # introduce-yourself (1)
- # jackdaw (1)
- # off-topic (10)
- # pathom (5)
- # portal (3)
- # re-frame (7)
- # reagent (12)
- # releases (1)
- # shadow-cljs (8)
- # tools-build (18)
- # web-security (10)
Quick poll: Do you toggle your dialogs / modals (with fullscreen overlays) using re-frame events/database or using reagent atoms (either component local or global)?
The former, because IMO a dialog being visible is always a part of the app's state.
I'll take the opposite view. Usually with an R/Atom. Come to think of it, I think it is because it feels odd to me to put a state like that in a db. I prefer the DB to stay focused on the main app data.
A generic dialog/modal component with no state and only arguments so that I can decided if I want to drive it with re-frame state or reagent state from the parent component. Both have pros/cons.
from past experience my preference is to store it in (with a clear distinction of purpose) or have it be a calculation based off of values in the app-db, for data driven visibility. simplifies things like having QA store the entire app-db as an edn file, for Devs to load locally and review exactly what they were experiencing. or ease interop with some analytics frameworks. still possible to do without storing everything in the app-db, but a bit more work to pull off. like mentioned, pros & cons to both paths, depends on the scenario at hand.