Fork me on GitHub
#reagent
<
2020-03-19
>
mmeix17:03:34

and in my src-file:

mmeix17:03:42

(ns app.views
  (:require [app.state :refer [app-state]]
            [app.mei :as m]
            [reagent.core :as r]
            ["@smooth-ui/core-sc" :refer [Normalize Button]]))

mmeix17:03:46

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 )
    in 

mmeix17:03:59

What am I doing wrong?

p-himik17:03:57

But what's the code though?

mmeix17:03:23

(forgot while reformatting post, sorry)

mmeix17:03:37

(defn app []
  [:<>
   [:> Normalize]
   [:> Button "TEST"]])

mmeix17:03:16

(and of course:)

mmeix17:03:29

(defn ^:dev/after-load start
  []
  (rd/render [views/app]
             (.getElementById js/document "app")))

mmeix17:03:48

(rd … reagent.dom)

lilactown17:03:25

@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

mmeix17:03:50

Learned: look into issues on github before asking here

mmeix17:03:41

oh … ok …