hi all! Iām trying to use the useEffect hook in a component that takes an argument. this is what I have so far:
(defn component-with-use-effect
[arg]
(react/useEffect (fn []))
[:div "arg:" (str arg)])
(defn parent-component
[arg]
[:f> component-with-use-effect])
However, you can see that the arg from parent-component is not getting passed to component-with-use-effect. Any advice on how to do this?But you don't pass the arg. Have you tried using [:f> component-with-use-effect arg]?
ah ha, thanks! š
I was trying variations like [:f> [component-with-use-effect arg]]