Skip to content

Commit

Permalink
solidjs: test bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Aug 18, 2022
1 parent 3278eb3 commit 77a0fb0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/solidjs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
dist
dist
11 changes: 6 additions & 5 deletions examples/solidjs/src/App.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
(defn Counter []
(let [[counter setCount] (createSignal 0)]
#jsx [:div
"Count:" (* 2 (counter))
[:button
{:onClick (fn []
(setCount (inc (counter))))}
"Click me"]]))
"Count:" (.join (range (counter)) " ")
[:div
[:button
{:onClick (fn []
(setCount (inc (counter))))}
"Click me"]]]))

(defn App []
#jsx [:div {:class styles.App}
Expand Down
6 changes: 3 additions & 3 deletions examples/solidjs/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { nth } from 'clavascript/core.js'
import { nth, range } from 'clavascript/core.js'
import styles from './App.module.css';
import logo from './logo.svg';
import { createSignal } from 'solid-js';
var Counter = function () {
let vec__14 = createSignal(0);
let counter5 = nth(vec__14, 0, null);
let setCount6 = nth(vec__14, 1, null);
return <div>Count: {(2 * counter5())} <button onClick={function () {
return <div>Count: {range(counter5()).join(" ")} <div><button onClick={function () {
return setCount6((counter5() + 1));
}}>Click me</button></div>;
}}>Click me</button></div></div>;
};
var App = function () {
return <div class={styles.App}><header class={styles.header}><img src={logo} class={styles.logo} alt="logo"></img> <Counter></Counter></header></div>;
Expand Down

0 comments on commit 77a0fb0

Please sign in to comment.