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.

Excluding some part of the store from Rehydration

See original GitHub issue

I just started digging into this repo, it’s a stellar work! well done.

There are few details that I’m still struggling with. Specifically:

1- It seems that the Store is always completely Rehydrated. Why do we need to include in the reducer something like:

case REHYDRATE:
      console.log('RECEIVED REHYDRATE FROM user')
      var incoming = action.payload.myReducer
       console.log(incoming)
      if (incoming) return {...state, ...incoming, specialKey: processSpecial(incoming.specialKey)}

      return state


2- let’s assume there is a subpart of a store that I don’t want to persist. let’s say, state.user.isAuthenticated. The idea is that this is a boolean that tells me if the user is authenticated or not. I want the user to go through authentication every time it opens the app (i’m on react native). the rest of the store should be normally rehydrated and persisted. How can I achieve this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rmevans9commented, Mar 8, 2017

I think you could achieve this with this library: https://github.com/edy/redux-persist-transform-filter

0reactions
aguynamedbencommented, Dec 22, 2018

This hasn’t been responded to in a long while, so I’m going to mark it as stale. Please feel free to continue the conversation and I’ll reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rehydrate an archived blob to an online tier - Azure Storage
To rehydrate a blob from the Archive tier by copying it to an online tier, use PowerShell, Azure CLI, or one of the...
Read more >
Rehydrating from Archives - Datadog Docs
Log Rehydration* enables you to capture log events from customer-owned storage-optimized archives back into Datadog's search-optimized Log Explorer, ...
Read more >
Oral Rehydration Solution - an overview | ScienceDirect Topics
A number of oral rehydration solutions have been shown to be effective. The main ingredients are water, glucose, sodium chloride, and bicarbonate in...
Read more >
First Aid: Dehydration (for Parents) - Nemours KidsHealth
Mild dehydration often can be treated at home. The doctor may recommend that you give an oral electrolyte solution (such as Pedialyte, Enfalyte,...
Read more >
Severe Dehydration Treatment Options | Everyday Health
Dehydration happens when your body has lost so much fluid and electrolytes that there isn't enough left for your body to function normally....
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