Hello! I’m just trying to use smooth-ui in a reagent project. I have this in my package.json:
"dependencies": {
"@smooth-ui/core-sc": "11.1.5",
"create-react-class": "^15.6.3",
"highlight.js": "9.15.10",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"styled-components": "^4.1.2",
"reakit": "^1.0.0-beta.12",
"styled-icons": "^5.4.0"
}
and in my src-file:
Triple backticks for multiline codeblocks.
(ns app.views
(:require [app.state :refer [app-state]]
[app.mei :as m]
[reagent.core :as r]
["@smooth-ui/core-sc" :refer [Normalize Button]]))
ok sorry
And a new line after the opening triplet, plus a new line in front of the closing one. :)
argh
hopefully …
Error:
Uncaught TypeError: Invalid value used as weak map key
at WeakMap.set (<anonymous>)
at getTheme (smooth-ui-core-sc.cjs.js:106)
at eval (smooth-ui-core-sc.cjs.js:131)
at renderWithHooks (react-dom.development.js:14826)
at updateForwardRef (react-dom.development.js:16841)
at beginWork (react-dom.development.js:18679)
at HTMLUnknownElement.callCallback (react-dom.development.js:189)
at Object.invokeGuardedCallbackImpl (react-dom.development.js:238)
at invokeGuardedCallback (react-dom.development.js:293)
at beginWork$1 (react-dom.development.js:23235)
getTheme @ smooth-ui-core-sc.cjs.js:106
eval @ smooth-ui-core-sc.cjs.js:131
renderWithHooks @ react-dom.development.js:14826
updateForwardRef @ react-dom.development.js:16841
beginWork @ react-dom.development.js:18679
callCallback @ react-dom.development.js:189
invokeGuardedCallbackImpl @ react-dom.development.js:238
invokeGuardedCallback @ react-dom.development.js:293
beginWork$1 @ react-dom.development.js:23235
performUnitOfWork @ react-dom.development.js:22189
workLoopSync @ react-dom.development.js:22162
performSyncWorkOnRoot @ react-dom.development.js:21788
scheduleWork @ react-dom.development.js:21220
updateContainer @ react-dom.development.js:24408
eval @ react-dom.development.js:24793
unbatchedUpdates @ react-dom.development.js:21935
legacyRenderSubtreeIntoContainer @ react-dom.development.js:24792
exports.render @ react-dom.development.js:24875
reagent$dom$render_comp @ dom.cljs:17
eval @ dom.cljs:41
eval @ dom.cljs:36
app$core$start @ core.cljs:9
app$core$main @ core.cljs:13
window.onload @ (index):27
load (async)
(anonymous) @ (index):27
react-dom.development.js:19561 The above error occurred in the <Button> component:
in Button (created by Context.Consumer)
in StyledComponent (created by styled(Button))
in styled(Button) (created by <http://app.views.app|app.views.app>)
in <http://app.views.app|app.views.app>
What am I doing wrong?
But what's the code though?
(forgot while reformatting post, sorry)
(defn app []
[:<>
[:> Normalize]
[:> Button "TEST"]])
(and of course:)
(defn ^:dev/after-load start
[]
(rd/render [views/app]
(.getElementById js/document "app")))
(rd … reagent.dom)
@mmeix I looked at the current open issues in smooth-ui’s github repo, and found this: https://github.com/smooth-code/smooth-ui/issues/167 it seems very related
oh … ok …
Learned: look into issues on github before asking here