@rkrupinski/stan 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,19 +7,28 @@
7
7
 
8
8
  Minimal, type-safe state management
9
9
 
10
- - [Website](https://rkrupinski.github.io/stan)
11
- - [API docs](https://rkrupinski.github.io/stan/docs/api)
12
- - [Examples](https://rkrupinski.github.io/stan/docs/getting-started/examples)
10
+ [🌐 Website](https://rkrupinski.github.io/stan)   |  
11
+ [📘 API docs](https://rkrupinski.github.io/stan/docs/api/state)   |  
12
+ [📝 Examples](https://rkrupinski.github.io/stan/docs/getting-started/examples)   |  
13
+ [📰 Blog Post](https://rkrupinski.com/post/introducing-stan)
14
+
15
+ A sneak peek:
13
16
 
14
17
  ```tsx
15
- import { atom } from '@rkrupinski/stan';
18
+ import { selectorFamily } from '@rkrupinski/stan';
16
19
  import { useStanValue } from '@rkrupinski/stan/react';
17
20
 
18
- const ultimateQuestion = atom(42);
21
+ const deepThought = selectorFamily<number, string>(
22
+ question => () => thinkDeep(question),
23
+ );
19
24
 
20
- function MyApp() {
21
- const answer = useStanValue(ultimateQuestion);
25
+ const MyApp: FC<{ question: string }> = ({ question }) => {
26
+ const answer = useStanValue(deepThought(question));
22
27
 
23
- return <h1>{answer}</h1>;
24
- }
28
+ return (
29
+ <p>
30
+ The Answer to {question} is ${answer}!
31
+ </p>
32
+ );
33
+ };
25
34
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rkrupinski/stan",
3
3
  "description": "Minimal, type-safe state management",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",