Skip to content

Instantly share code, notes, and snippets.

@geraldodev
Created May 24, 2020 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geraldodev/ca7954d3ee9c0e7f98862d7c49ca694c to your computer and use it in GitHub Desktop.
Save geraldodev/ca7954d3ee9c0e7f98862d7c49ca694c to your computer and use it in GitHub Desktop.
why defnc bean property is not interoperable with helix.dom ?
(ns app.ui.tw
(:require
["react" :as r]
["react-dom" :as rdom]
["react-hook-form" :as rhf]
["react-router-dom" :as rr]
[app.myhelix :refer [defnc]]
[helix.core :as hx :refer [$ <>]]
[helix.dom :as d]
[helix.hooks :as hooks]
))
(defnc Input
[props]
(.log js/console props)
(d/input props))
(defnc SomeComponent
[props]
($ Input {:class "form-input"}))
I get:
react-dom.development.js:13414 Uncaught Error: Objects are not valid as a React child (found: object with keys {meta, obj, prop__GT_key, key__GT_prop, recursive_QMARK_, __arr, __cnt, __hash, cljs$lang$protocol_mask$partition0$, cljs$lang$protocol_mask$partition1$}). If you meant to render a collection of children, use an array instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment