Status: Placeholder. Don't bother reading yet.
This EP proposes changes to facilitate easier use of React's Context feature. XXX to make it easier to write more complex Reusable components.
React components form a tree, with values being passed down
through the hierarchy in the form of props
. All very functional.
Except there are some problems:
Algebraic Effects are intended to help solve these kinds of problems in a functional way, but that's not our world.
The solution available in React is called Context
. It is a mechanism for allowing
data to be "shared" globally within a given tree of React components
(without it needing for it to be passed/threaded through all layers of that tree).
React's context docs are here.
re-com
is a library which supplies reusable Reagent widgets. And widgets
,
like a datepicker, are the simplest kind of components.
re-com
components are reusability because they take an input stream
of data
and they
achieves reusablity by passing in values and suppling callbacks. This works at the level of simple widgets.
But re-frame components need to subscribe and dispatch.
XXX talk about dispatch back
rather than callback
XXX need to identify the part of app-db
on which event handlers
and subscriptions
should operate.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close