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.

Really difficult to use realm.js with react.

See original GitHub issue
  1. snapshot not deep frozed /immutable. // 3years ago you say you areing working toward it 2.even no toObject or toArray common function in other database. 3.no equal or is function to compare two object or collection is updated or not. As we all know in react we need to refine code in shouldComponentUpdate to improve performance,without this funciton it is really very difficult to use realm.js. 4.debug mode in react-native failure because of realm.js last for a long time never really solved.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Genhaincommented, Oct 9, 2019

A performant Deep cloning snapshot would be a lifesaver. Currently having issues with a FlatList component because any changes made get handled by a realm listener and then forwarded to the FlatList then when i try to memoize or use shouldComponentUpdate to reduce unchanged prop render, the current prop and next prop are identical. So the fix for this is to make a deep clone of each object returned from the listener and then pass it to the FlatList , although this works on a small scale like in this little repo I have here, For my current project which handled a list with up to 100,000 of items with more complex UI, the cloning can take quite a while…if I had access to threads or background workers this would be a small pain, but i do not, so it is a big pain.

0reactions
Piero87commented, Feb 17, 2022

@fronck Thank you for your suggestion, I have read the repository and it seems very very interesting to me, it’s an upcoming package? what is its status?? alpha beta?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started with Realm for React Native | by mbvissers.eth
In this blog I will try and show you how to install and use the Realm database in your next React Native app....
Read more >
Realm JavaScript for React Native applications - YouTube
In this event, Andrew Meyer, Software Engineer, on the Realm JavaScript team, will walk us through the React Native ecosystem as it relates ......
Read more >
Building a to-do app with Realm React Native - YouTube
Andrew Meyer from the MongoDB / Realm team joins Jamon to build a quick to-do app on Realm React Native.
Read more >
How to use Realm Local DB in React Native? - Medium
Step 1: Install the NPM package · Step 2: Setup Schema and Realm Instance · Step 3: Write new objects to Realm ·...
Read more >
Realm JavaScript v11: A Step Forward for React Native
Realm is a fast, easy-to-use alternative to SQLite, ... code — most notably, the new Hermes JavaScript engine for React Native apps.
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