Fork me on GitHub
Rachel Westmacott14:04:03

I’m just upgrading to 0.8.0 and when I run my unit tests with doo I now get

Error while loading file: "target/test.js"
ReferenceError: "Set" is not defined
At line 153

ERROR: doo was not loaded from the compiled script.

Rachel Westmacott14:04:46

With 0.7.0 I get a successful test run.

Rachel Westmacott14:04:06

Is this issue known to anyone?


@peterwestmacott What js env are you using with Doo? Phantom?


Could be new React no longer works with Phantom


Set could refer to React using ES6 Sets

Rachel Westmacott14:04:41

oh, so could be latest reagent uses latest react which uses JS features not supported by my runtime?

Rachel Westmacott14:04:46

sounds super-plausible

Rachel Westmacott14:04:04

The JS line-number it gives me is deep in the minified version of React


Quick search says that Nashorn ES6 support requires Java 9

Rachel Westmacott14:04:20

yep - I’m just coming to that conclusion - but thanks for confirming

Rachel Westmacott14:04:32

looks like I need moar Java


Its not specific to Reagent. Theming is always a challenge. One thing that can ease the pain is to use the new React Context API and another solution is explore tools like css modules or styled-components / glamor - ideally you would combine both of these.


yeah, I guess I should have specified that we're using already


which uses context under the hood i'm pretty sure. it's just kind of gross to use with reagent


ah no, the react integration & ThemeProvider


I don't see any examples of using ThemeProvider without the styled.htmlElement or HOC


we just create style objects that we pass in as edn and then pass those in to the components as classes