Skip to content

Evaluating user permissions with useIsAuthorized yields unexpected results (development) #2731

Answered by emmenko
emmenko asked this question in Q&A
Discussion options

You must be logged in to vote

This looks like a problem with different versions of packages being installed in the monorepo, in particular related to React context.

You can check that with yarn why <package-name>, for example yarn why @commercetools-frontend/permissions.

In a monorepo, you need to make sure that packages use the same versions (if possible) especially if they rely on React context.

If different versions are installed, it can happen that a package writes the data into a React context but the other package that reads from the context uses a different React context.

Replies: 1 comment

Comment options

emmenko
Jul 27, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by emmenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant