Khalid Rahman
Khalid Rahman

Reputation: 125

Incorporating Realm , Redux and React Native

I'm currently working on a react native project . Here I want to use Realm as database incorporated with Redux.I searched over internet and theoretically tried to understand how whole things works together. But I found no simple demo / source code to get a clear picture of whole thing. Official website of Realm provides some good hints to depict the scenario and some useful guidelines but it did not provide the complete solution which I need.

Is there any useful resource with full source code (simple ,easy to understand) on how redux ,realm and react-native works together ? It would be a great help for me.

Upvotes: 4

Views: 2409

Answers (2)

Mukarram Ali
Mukarram Ali

Reputation: 427

It's time to avoid using Redux everywhere. It added tremendous complexity and so many steps to interact with DB. Also, the usual suggested approach of opening Realm connection inside actions is problematic since you don't use the real benefits of Realm objects. Here we ended up removing Redux altogether. https://medium.com/schmiedeone/avoid-using-redux-with-realm-move-to-a-thinner-data-layer-react-native-8e80cc7b07b3

Upvotes: 1

Hariharan L
Hariharan L

Reputation: 1411

Comparing Redux and Realm is odd. But, whether to have them both are choose one between them is sure, a problem.

For getting clear with, you can read the following links:

  • What is functionality difference between redux and realm, and which suits React? - Read this comment
  • RN+Redux+Realm - R3 solution in theory - this article
  • R3 solution in practical code - this article. The continuation of previous article

In my opinion React + Redux + Realm = R3 makes a good solution.

Upvotes: 3

Related Questions