Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rehydrate client storage after rx.remove_local_storage and rx.remove_cookies #1998

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

ElijahAhianyo
Copy link
Collaborator

@ElijahAhianyo ElijahAhianyo commented Oct 19, 2023

This PR rehydrates the state after rx.remove_local_storage, rx.remove_cookies and rx.clear_local_storage.

@@ -6,7 +6,7 @@ import env from "env.json";
import Cookies from "universal-cookie";
import { useEffect, useReducer, useRef, useState } from "react";
import Router, { useRouter } from "next/router";

import { initialEvents } from "utils/context.js"
Copy link
Collaborator Author

@ElijahAhianyo ElijahAhianyo Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesnt result in circular imports. However, a refactor(out of scope of this PR) is needed to break /utils/state.js into smaller files

@ElijahAhianyo ElijahAhianyo force-pushed the elijah/client-storage-rehydrate branch from a372a19 to 2bc2812 Compare October 19, 2023 17:01
@ElijahAhianyo ElijahAhianyo marked this pull request as ready for review October 19, 2023 18:28
@picklelo picklelo merged commit 7b8b646 into main Oct 19, 2023
37 checks passed
@picklelo picklelo deleted the elijah/client-storage-rehydrate branch November 1, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants