Closed lilactown closed 2 years ago
@emmanueljohn1 code-wise, the idea would be to introduce a new macro defnc-
which adds :private true
to the metadata of the display-name
symbol and passes it to defnc
.
I should take the time to create contributing docs, but as of now the best way to develop this would be to:
shadow-cljs watch dev
helix.core
defnc-
in a new namespace and try and refer to it workshop.core
. you should see a compiler warning saying that it's not publicI think you could also add a test for this in helix.core-test
:
(defnc- private-comp
[]
"can't see me outside of this namespace!")
(t/deftest private-component-definition
(let [metadata (meta #'private-comp)]
(t/is (:private metadata))))
Not 💯 on that but that's how I would try and tackle it first!
Tests can be run via shadow-cljs watch test
and navigating to http://localhost:8021
@lilactown I'm thinking of taking this on. I'm new to the code base. Do you have any tips on how I can tackle this?