helix

2022-05-12T19:17:14.665089Z

Hi folks, I wanted to understand how helix implements forwardRef as in defnc's doc, but I failed to find a declaration of React.forwardRef. I want to port this component https://github.com/radix-ui/design-system/blob/master/components/Heading.tsx to helix/cljs

lilactown 2022-05-12T23:16:43.346159Z

@geraldodev you can just use react/forwardRef

lilactown 2022-05-12T23:18:04.543019Z

(ns my-app.feature
  (:require
    ["react" :as react]
    [helix.core :refer [defnc]]))

(defnc my-component
  [props ref]
  {:wrap [(react/forwardRef)]}
  ,,,)

👍 2