-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with lein mies #6
Comments
If i modify the cljs_deps.js and delete the react reference like this, it seems to work fine. But that file gets re-generated on every change.. so its not quite fun.. 😄 |
You may have to stop om from importing react. ;; Also when importing om You also need to create a local file in your source directory: You need to create a folder at the top of your sources directory called cljsjs and then a file called react.cljs. You only need to declare that namespace above in the file. E.g. if your source directory for cljs is "src/cljs", you need to have src/cljs/cljsjs/react.cljs. I'm going to try and add the javascript dependencies using http://cljsjs.github.io/ I've been using reagent and re-frame lately, so I've gotten material ui to work with it. I will probably create a cljsjs/material-ui dependency to make working with the javascript easier. |
@taylorSando Have you got your reagent/re-frame material-ui code somewhere? I'm also playing around with re-frame and would love to have material ui working with it too, but haven't looked at doing it myself yet (am also using om-material-ui for an Om project). |
https://gist.github.com/taylorSando/9f779d58a34939e38f8b You still have to include the javascript and css files in the html. |
Works great, thanks!! |
Thank you! |
WARNING: Im a newbie, probably im doing things wrong..
Hi!
Wanted to ask about how do you guys use om-mui. I think im hitting a wall and wanted to ask some opinions.
Im creating a new 'lein mies hello-world' project, and adding om + om-material-ui as :dependencies.
When you do that, lein will create cljs_deps.js file that includes all the dependencies and gets included in the default index.html file.
When adding Om, the cljs_deps.js will contain react.inc.js, which seems to be React.
The problem begins when you add the material.js file in index.html.
That file includes mui and another react, so the page last with 2 reacts, and i see this in the console:
"Uncaught TypeError: Cannot read property 'firstChild' of undefined"
mui/material-ui#259
So, im trying to avoid loading both reacts.
On the sample page, its not loading the cljs_deps.js, so 'it bypassed the problem'.
How could we avoid this?
I guess the most correct would be to avoid having react in material.js, which seems possible with the --ignore flag of browserify, but that opens other problems.
What do you think?
Thanks!!
The text was updated successfully, but these errors were encountered: