This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-03
Channels
- # announcements (55)
- # babashka (14)
- # beginners (49)
- # biff (9)
- # calva (73)
- # cider (14)
- # clerk (8)
- # clj-kondo (6)
- # clojure (92)
- # clojure-dev (4)
- # clojure-europe (18)
- # clojure-norway (62)
- # clojure-uk (5)
- # clojuredesign-podcast (4)
- # clojurescript (34)
- # cursive (40)
- # data-science (4)
- # datomic (5)
- # dev-tooling (1)
- # eastwood (6)
- # emacs (107)
- # figwheel-main (9)
- # fulcro (13)
- # gratitude (9)
- # hyperfiddle (5)
- # introduce-yourself (2)
- # off-topic (45)
- # overtone (23)
- # portal (5)
- # releases (3)
- # shadow-cljs (6)
- # specter (1)
- # squint (32)
- # timbre (4)
- # vscode (2)
I found what I believe might be a bug with fulcro i18n: in dev changing the local works as expected, but in release builds it only change once then nothing happen on subsequent changes
Interestingly it does change the language of the footer where the language selection is but not the rest of the page
force-root-render! gets called every time
I wonder if it has to do with react 18+
it really looks like react is optimizing the re-rendering away 😄
Seems like you can't trust the rerender with react 18+ even with force-root? true it doesn't re-render everything which is a bummer when you are trying to change the locale through shared props
So my current fix is to dissoc the current locale translations, because I have when (some? (::i18n/translations current-locale))
in my root so the whole page is unmounted when the translation is changed, which I guess was the idea of force-render but new react is too hardcore
Seems like you can't trust the rerender with react 18+ even with force-root? true it doesn't re-render everything which is a bummer when you are trying to change the locale through shared props
@tony.kay shouldn't this be an OR? https://github.com/fulcrologic/fulcro/blob/main/src/main/com/fulcrologic/fulcro/components.cljc#L298
Since that fixes my issue with i18n above I'd conclude that was a bug in fulcro https://github.com/fulcrologic/fulcro/pull/548
Oh, I see. Yeah, the force root was really intended for dev time builds, but I forgot about i18n needing it to change locales
Thanks for fixing the fix, I wrongly assumed that the idea was to always re-render when in debug mode but I realize it was silly