Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
pesterhazy / es6-class-react.cljs
Last active August 17, 2018 13:14
React component in pure cljs using ES6 class inheritance
;; implementing a React component in pure cljs, no reagent necessary
;; using goog.object.extend to create a ES6 class that inherits from
;; React.Component
;; credit to @thheller
(defn MyReact [props context updater]
(this-as this
(js/React.Component.call this props context updater)))