SCI Playground

Write and evaluate SCI Clojure using any of the libraries in sci.configs in the editor below. Use Cmd / Ctr - Enter to evaluate.

Supported libraries: todo.

(ns test1
      (:require
        [applied-science.js-interop :as j]
        [promesa.core :as p]
        [cljs-bean.core :refer [bean ->clj ->js]]
        [re-frame.core :as rf]
        [re-frame.db :as rf.db]
        [re-frame.alpha :as rf.a]
        [reagent.core :as r]
        [reagent.dom.server :as rds]
        [reagent.dom.client :as rdc]
        [reagent.debug]
        [replicant.dom :as replicant]
        [portfolio.replicant :refer-macros [defscene]]
        [portfolio.ui :as portfolio]
        [reagent.ratom :as ratom]
        [reitit.frontend :as reitit]
        [datascript.core :as d]
        [datascript.db :as d.db]
        [com.fulcrologic.fulcro.application :as app]
        [com.fulcrologic.fulcro.components :as comp :refer [defsc]]
        [com.fulcrologic.fulcro.dom :as dom]
        [javelin.core :as jc]))

(def router
  (reitit/router
    [["/api/ping" ::ping]
     ["/api/orders/:id" ::order]]))
(reitit/match-by-path router "/api/ping")

(defscene hello
  [:h1 "hello Portfolio"])
        
(defsc Root [this props]
 (dom/div (dom/h3 "Hello from SCI!")
   (dom/p "Here you can play with Fulcro and Reagent apps and much more!")))
(app/mount! (app/fulcro-app) Root "app")

(replicant/render (.getElementById js/document "app") [:h1 "Hello Replicant!"])
    
You can use this <div id="app"> to render DOM.

Auto-evaluation GitHub gists

You can automatically load and evaluate a gist by appending ?gist=GIST-ID to the URL. All clj* files from the gist are loaded into the editor in the order of their names and evaluated automatically. You can try our test gist (by clicking here).

Playground source code