fulcro-garden-css
fulcro-garden-css copied to clipboard
Drop `cljsjs` react in favour of node modules
Change the requires to pull in the node_modules
installed react.
This change is needed for: https://github.com/awkay/workspaces/pull/6
Technically I don't see any actual need to require them at all now. Neither of those namespaces uses React directly. It used to be that you needed to make sure the global js/React and such were defined, but nowadays things work a lot better. This is some old code. You might glance through the rest of the source and see if there are any js/React*
usages, because that would also be bad.
Yeah, I looked. I don't thing any requires for React are needed. Fulcro's namespaces take care of the low-level react stuff.
This call in Fulcro is a challenge.
Since requiring ["react-dom/server" :as react.server]
in that ns
will declare a hard dependency on react-dom-server
that Fulcro would not want?
The tests for fulcro-garden-css
fails because of this (and also, the tests in this PR is failing already. Ugh.)
The tests pass if I invoke (react.server/renderToString c)
instead.
So, yes, if there are any direct refs to react things in this lib, then they need to be resolved as you noted. Yes, Fulcro's not going to change to service this lib. This lib should be fixed to do things correctly, including the tests.