Skip to content

Commit

Permalink
chore: add a note about useBridge (pmndrs#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Feb 5, 2021
1 parent b6da63c commit 6f02139
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/api/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ The `updateValue` takes just one argument, which will be passed to the third arg

## useBridge/Bridge

Libraries such as react-three-fiber use custom renderer/reconciler a.k.a multiple roots.
Contexts don't go beyond different renderer, so it requires a workaround.
Bridge is a known technique for the escape hatch.
See [this](https://github.com/pmndrs/react-three-fiber/issues/43) for more information.

```ts
const useBridge = (scope?: Scope) => [Actions, State]
```
Expand Down

0 comments on commit 6f02139

Please sign in to comment.