-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (63 loc) · 3.92 KB
/
index.html
File metadata and controls
76 lines (63 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<base href="/">
<link rel="shortcut icon" href="favicon.ico">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<!-- preload -->
<link href="https://fonts.googleapis.com/css2?family=Sulphur+Point:wght@700" rel="preload" as="style">
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap" rel="preload" as="style">
<link type="text/css" href="style.fef27888231864031cf72f4b1c4c3f53.css" rel="stylesheet">
<link
href="https://fonts.googleapis.com/css2?family=Sulphur+Point:wght@700"
rel="stylesheet"
media="print" onload="this.media='all'"
/>
<link
href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"
rel="stylesheet"
media="print" onload="this.media='all'"
/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css" rel="stylesheet">
<link href="/assets/highlightjs/androidstudio.css" rel="stylesheet">
<meta name="description" content="***">
<title>Home</title>
<meta property="og:type" content="website">
<meta property="og:title" content="Home">
<meta property="og:url" content="https://callback-stack.github.io/">
<meta property="og:site_name" content="Verb Data">
<meta property="og:image" content="https://callback-stack.github.io/assets/common/verb-og.png">
<meta property="og:description" content="***">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<!-- <meta property="og:image:alt" content="">-->
<meta name="twitter:card" content="summary_large_image">
<!-- <meta name="twitter:creator" content="@">-->
<!-- <meta name="twitter:site" content="@">-->
<meta name="twitter:description" content="***">
<meta name="twitter:image" content="https://callback-stack.github.io/assets/common/verb-og.png">
<meta name="twitter:title" content="Home">
<!-- <script src="/assets/highlightjs/highlight.pack.js"></script>-->
</head>
<body>
<div id="root"><div class="layout-4dd"><div class="restricted-width"><div class="header-7be"><div class="container"><a class="logo" href="/">Callback Stack</a><div class="links"><a class="menu-item menu-item-255 active" href="/">Home</a><a class="menu-item menu-item-255" href="/api/">API</a><a class="menu-item menu-item-255" href="/docs/">Docs</a></div><div class="right-buttons"></div></div></div><div class="content"><div class="home-88u"><div class="section"><h1>Getting Started</h1><div class=""><div class="">Installation:</div><pre class="code-7vj"><code class="jsx">npm i --save cs-react</code></pre></div><div class=""><div class="">Simple state sample:</div><div class=""><div class="code-sample-4ej"><pre class="code-7vj"><code class="jsx">import * as React from "react";
import {cs, State} from "cs-react";
const Example = () => cs(
["count", ({}, next) => State({initValue: 0, next})],
({count})=>(
<div>
Count: {count.value}
<button
onClick={()=>count.change((v)=>v+1)}
>+</button>
<button
onClick={()=>count.change((v)=>v-1)}
>-</button>
</div>
),
);</code></pre><div class="codepen">Here is the CodePen <a target="_blank" href="https://codepen.io/quanla/pen/JjEmOpP?editors=0010">demo</a></div></div></div></div></div></div></div><div class="footer-46l"></div></div></div></div>
<script src="bundle.229a957970d8c17654bb.js" type="application/javascript" async></script>
</body>
</html>