realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.72k stars 564 forks source link

Add `useProgress` to `@realm/react` #6797

Closed gagik closed 4 weeks ago

gagik commented 1 month ago

Problem

With https://github.com/realm/realm-js/issues/6256 completed, flexible sync can now support progress notifications.

To improve the experience on @realm/react, it'd be great to expose the functionality through a useProgress hook.

Solution

const MyComponent = () =>
{
     const progress = useProgress();      
     return <div>{progress}/1.0 loaded</div>
}

Alternatives

No response

How important is this improvement for you?

Would be a major improvement

Feature would mainly be used with

Atlas Device Sync

sync-by-unito[bot] commented 1 month ago

➤ PM Bot commented:

Jira ticket: RJS-2867