Skip to content

Commit

Permalink
docs: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Apr 4, 2024
1 parent 3bd4b36 commit 966c33a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,18 +410,18 @@ function App() {
return () => {
console.log('Unmounted')
}
}
}

return effect$(
effect,
effect, // or array of effects
div()('Hello, Nanoviews!')
)
}
```

### decide$

`decide$` is a method that can switch between different blocks.
`decide$` is a method that can switch between different childs.

```js
import { atom } from 'nanostores'
Expand Down Expand Up @@ -595,14 +595,14 @@ portal$(

```js
import { atom } from 'nanostores'
import { i, b, await$, $pending, $then, $catch } from 'nanoviews'
import { i, b, await$, pending$, then$, catch$ } from 'nanoviews'

const $promise = atom(Promise.resolve('Hello, Nanoviews!'))

await$($promise)(
$pending(() => i()('Loading...')),
$then((value) => b()(value)),
$catch((error) => String(error))
pending$(() => i()('Loading...')),
then$((value) => b()(value)),
catch$((error) => String(error))
)
```

Expand Down
12 changes: 6 additions & 6 deletions packages/nanoviews/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,15 @@ function App() {
}

return effect$(
effect,
effect, // or array of effects
div()('Hello, Nanoviews!')
)
}
```

### decide$

`decide$` is a method that can switch between different blocks.
`decide$` is a method that can switch between different childs.

```js
import { atom } from 'nanostores'
Expand Down Expand Up @@ -595,14 +595,14 @@ portal$(

```js
import { atom } from 'nanostores'
import { i, b, await$, $pending, $then, $catch } from 'nanoviews'
import { i, b, await$, pending$, then$, catch$ } from 'nanoviews'

const $promise = atom(Promise.resolve('Hello, Nanoviews!'))

await$($promise)(
$pending(() => i()('Loading...')),
$then((value) => b()(value)),
$catch((error) => String(error))
pending$(() => i()('Loading...')),
then$((value) => b()(value)),
catch$((error) => String(error))
)
```

Expand Down

0 comments on commit 966c33a

Please sign in to comment.