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

user.recall callback always executed #905

wants to merge 1 commit into
base: master


Copy link

robhicks commented Feb 14, 2020

I believe user.recall should always execute the passed-in callback. I would like to use it like this in a React AuthProvider:

useEffect(() => {
    const noUserState = { status: 'success', user: null, createUser, authenticate };
    user.recall({ sessionStorage: true }, resp => {
      if (resp.err) setState(noUserState);
      else if (!resp) setState({ noUserState });
      else setState({ status: 'success', user, logout });
  }, []);

To do so, user.recall needs to fire the callback.

I don't know about how to unbuild sea. I looked at /lib/unbuild.js and tried unsuccessfully to modify it. I also can't get the tests the sea tests to run so I couldn't write tests. npm run seatest throws an error.

I found the entire unbuild process very confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.