diff --git a/packages/dataverse/README.md b/packages/dataverse/README.md index 7e384a1cd0..98e29993be 100644 --- a/packages/dataverse/README.md +++ b/packages/dataverse/README.md @@ -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 @@ -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. @@ -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. @@ -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 @@ -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 diff --git a/packages/dataverse/api/modules/prism.md b/packages/dataverse/api/modules/prism.md index 6caf9fef8a..c9c5c4aa28 100644 --- a/packages/dataverse/api/modules/prism.md +++ b/packages/dataverse/api/modules/prism.md @@ -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 | @@ -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 @@ -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 diff --git a/packages/playground/README.md b/packages/playground/README.md index 4c6740bdc0..17b1bf145e 100644 --- a/packages/playground/README.md +++ b/packages/playground/README.md @@ -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 @@ -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.