Skip to content

Instantly share code, notes, and snippets.

View not-in-stock's full-sized avatar
🎯
Focusing

Andrei Fëdorov not-in-stock

🎯
Focusing
  • Berlin, Germany
View GitHub Profile
(ns not-in-stock.components.scrollbars
(:require [clojure.walk :as walk]
goog.object
[medley.core :as medley]
["react-custom-scrollbars" :default ReactCustomScrollbars]
[reagent.core :as r]
[superstring.core :as str]))
(defn- lisp-keyword [kw]
(keyword (str/lisp-case kw)))
(ns not-in-stock.macro.events
(:require [clojure.spec.alpha :as s]
[medley.core :as medley]
[re-frame.core :as re-frame]))
(defn- prepend-if-absent [xs x]
(cond->> xs
(nil? (medley/find-first #(= x %) xs)) (into [x])))
(defn- default-reg-event [reg-event-fn]
(ns not-in-stock.macro.subs
(:require [clojure.spec.alpha :as s]
[re-frame.core :as re-frame]
#?(:cljs reagent.ratom)))
(defn- signal-sub-form [signal]
`(re-frame/subscribe ~signal))
(defn- signal-fn-form [sub-bindings signals]
`(fn [~sub-bindings]