Fork me on GitHub
#helix
<
2020-11-19
>
witek21:11:07

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

ordnungswidrig09:11:11

Why would one use react context rather than a dynamic binding in clojure?

wilkerlucio14:11:45

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)

ordnungswidrig18:11:28

Oh, the point about async is interesting.