Hello. I need a hint, how to use a react context value in a deeply nested component. The documentation explains how to create a context with helix.core/provider
but not how to use it in the child component. Thank you.
https://cljdoc.org/d/lilactown/helix/0.0.13/doc/creating-elements#context-providers
https://reactjs.org/docs/hooks-reference.html#usecontext You're looking for useContext
Why would one use react context rather than a dynamic binding in clojure?
useContext integrated on react, so if JS users use your component they can change it via standard react stuff. also the flow of both are different, dynamic binding loses its data if something async happens, while react contexts dont (to support react async rendering)
Oh, the point about async is interesting.
And here's the helix wrapper @witek https://cljdoc.org/d/lilactown/helix/0.0.13/api/helix.hooks#use-context :)