Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/dataverse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const atom = new Atom({intensity: 1, position: {x: 0, y: 0}})
#### Changing the state of an atom

```ts
// replace the whole stae
// replace the whole state
atom.set({intensity: 1, position: {x: 0, y: 0}})

// or using an update function
Expand Down Expand Up @@ -327,7 +327,7 @@ p.onChange(ticker, (value) => {

Just like React's `useRef()`, `prism.ref()` allows us to create a prism that
holds a reference to some value. The only difference is that `prism.ref()`
requires a key to be passed into it, whlie `useRef()` doesn't. This means that
requires a key to be passed into it, while `useRef()` doesn't. This means that
we can call `prism.ref()` in any order, and we can call it multiple times with
the same key.

Expand All @@ -351,7 +351,7 @@ p.onChange(ticker, (value) => {

`prism.memo()` works just like React's `useMemo()` hook. It's a way to cache the
result of a function call. The only difference is that `prism.memo()` requires a
key to be passed into it, whlie `useMemo()` doesn't. This means that we can call
key to be passed into it, while `useMemo()` doesn't. This means that we can call
`prism.memo()` in any order, and we can call it multiple times with the same
key.

Expand Down Expand Up @@ -598,7 +598,7 @@ atom.set(1)
console.log(val(a)) // 2
```

Prism states propogate through the prism dependency graph. Let's look at an
Prism states propagate through the prism dependency graph. Let's look at an
example:

```ts
Expand Down Expand Up @@ -657,7 +657,7 @@ unsub()
// 🧊 | 🧊 | 🧊 |
```

The state transitions propogate in topological order. Let's demonstrate this by
The state transitions propagate in topological order. Let's demonstrate this by
adding one more prism to our dependency graph:

```ts
Expand Down
6 changes: 3 additions & 3 deletions packages/dataverse/api/modules/prism.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ An effect hook, similar to React's `useEffect()`, but is not sensitive to call o

| Name | Type | Description |
| :------ | :------ | :------ |
| `key` | `string` | the key for the effect. Should be uniqe inside of the prism. |
| `key` | `string` | the key for the effect. Should be unique inside of the prism. |
| `cb` | () => () => `void` | the callback function. Requires returning a cleanup function. |
| `deps?` | `unknown`[] | the dependency array |

Expand Down Expand Up @@ -121,7 +121,7 @@ ___
▸ <`T`\>(`key`, `fn`, `deps`): `T`

`prism.memo()` works just like React's `useMemo()` hook. It's a way to cache the result of a function call.
The only difference is that `prism.memo()` requires a key to be passed into it, whlie `useMemo()` doesn't.
The only difference is that `prism.memo()` requires a key to be passed into it, while `useMemo()` doesn't.
This means that we can call `prism.memo()` in any order, and we can call it multiple times with the same key.

##### Type parameters
Expand Down Expand Up @@ -167,7 +167,7 @@ ___
▸ <`T`\>(`key`, `initialValue`): `IRef`<`T`\>

Just like React's `useRef()`, `prism.ref()` allows us to create a prism that holds a reference to some value.
The only difference is that `prism.ref()` requires a key to be passed into it, whlie `useRef()` doesn't.
The only difference is that `prism.ref()` requires a key to be passed into it, while `useRef()` doesn't.
This means that we can call `prism.ref()` in any order, and we can call it multiple times with the same key.

##### Type parameters
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $ yarn playwright codegen http://localhost:8080/tests/[playground-name] # run th

## Visual regression testing

Some `.e2e.ts` files also contain visual regression tetst. These tests run only
Some `.e2e.ts` files also contain visual regression test. These tests run only
the the [CI](../../.github/workflows/main.yml) using
[Github actions](https://github.com/theatre-js/theatre/actions). Look at the
example at
Expand All @@ -87,5 +87,5 @@ $ yarn test:e2e:ci
```

If you're submitting a PR that breaks the visual regression tests and you're not
familiar with Docker, simply ask the mainainers to update the screenshots for
familiar with Docker, simply ask the maintainers to update the screenshots for
you.