question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Is there a way to call useUpdate without a provider?

See original GitHub issue

I have a component that wish to be optionally wrapped around a react-tracked provider, is there a way to do that? Right now, if i just call the useUpdate hook, it would throw no provider error message. 😦

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dai-shicommented, Mar 17, 2022

Please try #143. https://ci.codesandbox.io/status/dai-shi/react-tracked/pr/143 Find “Local Install Instructions” ☝️

0reactions
dai-shicommented, Mar 18, 2022

Thanks for confirming. I’ll merge #143 soon.

Say, I have a dozen useUpdate happening, I want to update the internal state in the reducer, and only after the mass update stopped then I trigger the final state change.

If they happen in sync, they should be batched. According to your description they are not. In React 18, automatic batching will be introduced. If that doesn’t help, I’d rather suggest to batch events on your end before invoking update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

useUpdate call empties a list of results from useGetList
useUpdate can update the record so that it gets the right title, but the position of the element in the list will change,...
Read more >
Call useUpdateMany callback with data - react admin
I want to call the updateMany in a handleSubmit function, so I will only have the data when the function is called: export...
Read more >
React-admin - Using Data Providers
Setting Up The Data Provider. <Admin dataProvider>. The first step to use a Data Provider is to pass it to the <Admin> component....
Read more >
Use update sets for surveys and assessments
Use an update set to capture changes to surveys and assessments.
Read more >
US Update to latest 7.1.1... when should I expect it?
correct link for OP3T https://forum.xda-developers.com/oneplus-3t/how-to/rom- ... just dont get why people cant download the update and use update locally.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found