Skip to content
This repository was archived by the owner on Sep 18, 2022. It is now read-only.
Merged
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
8 changes: 7 additions & 1 deletion docs/react.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# React usage (hooks api)

crudodb instance should be provided as a context.
> only textual recommendation

1. CrudoDb instance should store in a root provider
2. use a generic or specific hook for your schema
1. provide context for your schema in a context
2. build a hook which provide an api for your tables

Example which is not perfect, but provide an [idea](https://codesandbox.io/s/react-with-crudodb-2-jvqn4)