bhauman / devcards

Devcards aims to provide a visual REPL experience for ClojureScript
1.53k stars 113 forks source link

WIP: Global-exports to require React and support node modules #127

Closed Deraen closed 6 years ago

Deraen commented 7 years ago

This is similar to https://github.com/reagent-project/reagent/pull/306 https://github.com/reagent-project/reagent/blob/master/CHANGELOG.md#080-alpha1-2017-07-31

I'm opening PR's on other related projects also:

It is possible further changes to ClojureScript will make this change (partially) unnecessary: https://dev.clojure.org/jira/browse/CLJS-2331

Build causes lots of warnings:

WARNING: No such namespace: react, could not locate react.cljs, react.cljc, or JavaScript source providing "react" at line 37 example_src/devdemos/om_next.cljs
WARNING: Use of undeclared Var react/Component at line 37 example_src/devdemos/om_next.cljs

It is probably these are caused by problems in Om.

Some views work on browser, but there are some errors on console and at least om.next card is empty:

image

bhauman commented 6 years ago

Closing because this should be resolved.

Deraen commented 6 years ago

How so?

Devcards (and sablono) is still referring to js/React so it won't work when using React from Node package.

bhauman commented 6 years ago

Oh sorry, I was confused will reopen.

On Oct 25, 2017, at 2:31 PM, Juho Teperi notifications@github.com wrote:

How so?

Devcards (and sablono) is still referring to js/React so it won't work when React from Node package.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

bhauman commented 6 years ago

this is fixed with https://github.com/bhauman/devcards/commit/4881652a48bece35f25b7d8aa1e39f73ecacb751