package.json
{
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@blueprintjs/core": "^3.22.0",
"@blueprintjs/datetime": "^3.15.1",
package.json
{
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@blueprintjs/core": "^3.22.0",
"@blueprintjs/datetime": "^3.15.1",
(rf/reg-fx ::navigate (fn [a] (navigation/dispatch (navigation/navigate-action a)))) | |
(rf/reg-fx ::navigate2 (fn [[a b]] (navigation/navigate a b))) | |
(rf/reg-fx ::back (fn [] (navigation/dispatch (navigation/go-back-action)))) | |
(rf/reg-fx ::reset-stack-by-key (fn [m] (navigation/dispatch (navigation/reset-action m)))) | |
(rf/reg-fx ::pop (fn [n] (navigation/dispatch (navigation/pop-action n)))) | |
(rf/reg-fx ::pop-to-top #(navigation/dispatch (navigation/pop-to-top-action))) |
(ns canidatalogtocte | |
(:require [clojure.java.jdbc :as jdbc] | |
[clojure.string :as str] | |
[clojure.spec.alpha :as s] | |
[datascript.core :as d] | |
[clojure.test :refer [is]])) | |
(s/check-asserts true) | |
(def sqlite-db |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'verbose': { | |
'format': '%(levelname)s %(asctime)s %(module)s ' | |
'%(process)d %(thread)d %(message)s' | |
}, | |
}, |
Setup is based on clojurescript getting started guide. I've added a require statement to the core ns and using the latest master sha
deps.edn
{:deps {org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript.git"
:sha "ec0fc33030ae1858a29c52f38e81fba4180d492b"}}}
src/hello_world/core.cljs
Based on: https://reactjs.org/docs/error-boundaries.html
Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.
As of React 16, errors that were not caught by any error boundary will result in unmounting of the whole React component tree.
Reagent gives us access to the error boundary features
:component-did-catch stops
the unmounting behaviourThis was close to useful but the SQL generated has problems with ORDER BY clauses.
The subquery was necessary to avoid GROUP BY problems.
class AG_DATES_OVERLAP(Func):
function = 'dbo.AG_DATES_OVERLAP'
template = "%(function)s(%(expressions)s)"
(ns app.test-runner | |
(:require [clojure.test :refer [deftest is run-tests]])) | |
(deftest is-this-working? | |
(is (= 1 2))) | |
(defmethod cljs.test/report [:cljs.test/default :end-run-tests] [m] | |
(when-not (cljs.test/successful? m) | |
(throw "Test failed"))) |
(ns v1 | |
(:require [clojure.test.check :as tc] | |
[clojure.test.check.generators :as gen] | |
[clojure.test.check.properties :as prop] | |
[clojure.spec.alpha :as s])) | |
(defn gen-char [n] | |
(gen/fmap #(apply str %) (gen/vector gen/char-alphanumeric n))) | |
(defn gen-varchar [n] |