Realm Database with Redux
See original GitHub issueGoals
In fact, I’m building a react native application and i’m using Realm as database and also I’m using redux to manage state, but I find a problem when I pass realm object through reducers my application goes slow.
Expected Results
Getting and parsing data
Actual Results
Slower navigation of react native application
Code Sample
let users = realm.objects("User");
dispatch({
type: FETCH_SEARCH_USERS_GLOBAL,
payload: users
})
Version of Realm and Tooling
- Realm JS SDK Version: 2.16.0
- React Native: 0.57
- Client OS & Version: macOS 10.14.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Using Realm with redux - MongoDB Atlas App Services & Realm
I would highly recommend against putting realm collections and/or items in a redux store, as Realm objects are self-mutating objects, and ...
Read more >How to handle states with redux and realm [react-natve]
1 Answer 1 · Redux is state management library and Realm is just database solution. I guess you are trying to say redux...
Read more >lolatravel/realm-react-redux - GitHub
In redux you have a reducer that takes the current state and an action which it processes to return a new state. In...
Read more >Realm vs Redux Persist | What are the differences?
Realm is reactive, concurrent, and lightweight, allowing you to work with live, native objects; Redux Persist: A library to persist and rehydrate a...
Read more >React native, Redux,Redux-thunk realm and redux persist
Redux persist makes it easy to store the state of redux store.However,as the applications complexity increases, we may require a database to ...
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 FreeTop 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
Top GitHub Comments
@benhartouz I’m also using Realm and Redux on projects and in my case, I use the thunks/sagas to write API responses to the Realm database only and, on the Containers, I just make the queries to the Realm database and make them listen for live changes. With this behavior, I only use Redux for stuff that I don’t need to store on device and which is shared along different Containers.
@ivanpagac thanks for your comment, in fact, I passed it through redux-thunk. what do you mean by v raw objects?