Fork me on GitHub
#reagent
<
2018-08-22
>
lepistane14:08:54

could anyone help me? i removed unused soda-ash dependency and after that i am getting

Uncaught Error: js/ReactDOM is missing

lepistane14:08:59

how do i fix this?

mikerod14:08:24

@lepistane It looks like your project is missing a dependency on react DOM

mikerod14:08:58

and there are several ways to go about getting that and it also depends on what else you are using

lepistane14:08:20

isn't that included with reagent?

mikerod14:08:22

if you are using reagent 0.8x there are some details

mikerod14:08:30

but I don’t know what your setup is, so can’t say for sure

lepistane14:08:04

i am using someone else's project i did some refactoring i think it's not setup correctly

lepistane14:08:12

reagent i am using is 6.0

mikerod14:08:58

I think with no other changes, the react cljsjs dependencies are transitively included via reagent

mikerod14:08:07

however, you may have :exclusions setup etc, so I don’t know

mikerod14:08:18

it does at least seem like you are missing a dependency on react-dom

mikerod14:08:38

I’m not sure if you are using lein, boot, etc to build. If you are using lein one thing to take a look at is lein deps :tree

Julien Fleury16:08:47

Hi there! I’m trying to import react + other react js modules aside from reagent, with a webpack bundle. It works well with reagent 0.6.0 and React 15 but I didn’t succeed to make it work for Reagent 0.8.1 and React 16. Did someone already had the problem ? I opened an issue on pesterhazy/double-bundle github example : https://github.com/pesterhazy/double-bundle/issues/2

mikerod16:08:40

@julien.fleury I don’t see you have any reference to the bundle via :foreign-libs

mikerod16:08:11

it is related to this double bundle setup, but maybe has a bit more guidance with the :foreign-libs part

Julien Fleury16:08:21

Yes, I tried that too. From what I understand, if I had a :foreign-lib, then I should remove the “script” in html page, because then the js compiled code is integrated in the clojure compiled code

Julien Fleury16:08:45

But unfortunately, couldn’t get it to work too

mikerod16:08:03

yes, that is correct - and I prefer the :foreign-libs approach so it integrates a bit more smoothly

mikerod16:08:16

what error do you get? and have you made sure to fully clean your environment

Julien Fleury16:08:46

how do you clean ? I basically run a lein clean

Julien Fleury16:08:00

I agree, I better like the foreign-libs too, here was my problem with foreign-lib: https://clojurians.slack.com/archives/C03S1L9DN/p1534946547000100

Julien Fleury16:08:49

Well, I got back to this solution again, cleaned everything (node_modules, resources/public/js).. And it seems to work (not yet entirely sure)

Julien Fleury16:08:19

Maybe a change I did in the meantime...

Julien Fleury17:08:34

It really works ! Many many thanks ! =D

mikerod20:08:56

@julien.fleury yeah I think it was trying to scan through your node_modules I guess.

mikerod20:08:14

You can set that to false with a flag I think so it doesn’t attempt that maybe.

dijonkitchen20:08:13

Anyone see a problem where TextFields can’t be filled when using the Material UI TextField fix? http://reagent-project.github.io/docs/master/material-ui.html

dijonkitchen20:08:05

When I control the components with re-frame I can edit them just fine, but non-managed components can’t.

jsa-aerial23:08:41

I think this is a general reagent db/ratom design question. At first I thought having a single ratom that held all state was a 'great' plan. This works (for some value of 'works') but since any change to any part of it will result in a new value for it, basically everything will re-render (even if most of those are pointless overhead). OTOH, having ratoms all over the place seems like a bad idea as well. So, what do people who know consider best (or at least better) practice here?