This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-03
Channels
- # aleph (1)
- # announcements (9)
- # babashka (3)
- # beginners (200)
- # calva (22)
- # cider (74)
- # clojure (97)
- # clojure-dev (43)
- # clojure-europe (15)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-sanfrancisco (2)
- # clojure-uk (103)
- # clojuredesign-podcast (2)
- # clojurescript (45)
- # core-async (5)
- # cursive (13)
- # datomic (42)
- # emacs (20)
- # fulcro (6)
- # graalvm (37)
- # jackdaw (10)
- # leiningen (7)
- # mid-cities-meetup (3)
- # off-topic (2)
- # pathom (1)
- # pedestal (3)
- # re-frame (6)
- # reagent (38)
- # reitit (5)
- # shadow-cljs (117)
- # spacemacs (1)
- # sql (1)
- # tools-deps (17)
- # vim (14)
- # xtdb (18)
js functions are already class constructors and can have things hung from there, which is how Fulcro components work (component options like query/ident are hung on the function)…so, really its just a few steps I think:
1. Make a function that can create functions and hang the right stuff on them. Similar to configure-component!
2. Create a useFulcro
hook that returns the right stuff (it would in turn use useState, and do the various indexing tasks)
3. Improve the renderers? Not sure that is necessary other than the props tunneling would have to be checked (I think you’d just add a React-like setState
method on the function), but that’s relatively easy I think, since you’ve indexed the new instance in (2).
4. Possibly add all that into the defsc
macro with a :use-hooks?
option that would error check that you’re not using lifecycle, and call (1) instead