DataStore hooks for react
See original GitHub issueFeature Request
We need to create generic hooks for Datastore.
Currently, we are looking at passing the model as input to CRUD hooks, like this
useAdd(model) or useDataStoreAdd(model)
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
React - using Datastore Hooks - Offix
Offix Datastore provides react hooks for CRUD operations and subscription. For a quick start see sample react app.
Read more >Simplify querying the Amplify DataStore using React hooks
React hook to read from the [Amplify DataStore](https://docs.amplify.aws/lib/datastore/getting-started/q/platform/js). * Built-in supports for real-time ...
Read more >Use React Hooks with Storage as Global State Management
With hooks, we can use state and other React features without writing a class. With useEffect , we can run some function as...
Read more >How to Use localStorage with React Hooks to Set and Get Items
Hooks allow React developers to use state and lifecycle methods within functional components. They also operate with existing code, making them ...
Read more >Using React Hooks for state management - LogRocket Blog
Using the useReducer Hook for state management in React enables you to share state between components without Redux.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@wtrocki I will start plain hooks
We need both. Lazy query is needed when you have conditionals etc. We can start with first one though. I think apollo has this concept of lazy query it has called flag returned by hook called boolean A boolean indicating if the query function has been called, used by useLazyQuery (not set for useQuery / Query). https://www.apollographql.com/docs/react/data/queries/