-
Notifications
You must be signed in to change notification settings - Fork 113
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
store.dispatch action redux from mini app to host app not working #791
Comments
Hey @HongQuang231, please create a reproduction repository showcasing the problem so we determine if this needs fixing or is a matter of configuration, thanks! |
in host app and mini app i config redux look like this: import {configureStore} from '@reduxjs/toolkit'; import reducer from './slices'; // create the saga middleware // Persist config // Wrap the root reducer with persistReducer // mount it on the Store // then run the saga // Create a persistor export type RootState = ReturnType; export {store, persistor}; // Export persistor two projects so i have config two store file. |
i have a problem, if the mini app has accessToken expired, how can I create interceptor with fetch api in the mini app and it will direct to login in the host app |
@HongQuang231 please create a repository with everything in place, I'm not able to dedicate enough time to recreate your example from scratch based on the code snippets you've provided. |
@jbroma my repo look like this and in mini app i have 2 func I want to use store.dispatch(commonActions.setIsAuthorized(true)); in mini app, can you help me, thanks |
This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days. |
Describe the bug
i have a host app and mini app and two projects also setup redux, in the mini app, I use dispatch by useDispatch from func component .tsx, and it's working, but when i use store.dispatch() it not working. in two projects, i have a slice
note:
const dispatch = useAppDispatch()
dispatch(commonAction.setIsAuthorized(true)) // working
store.dispatch(commonAction.setIsAuthorized(true)) // not working
System Info
Re.Pack Version
4.0.0
Reproduction
c
Steps to reproduce
no
The text was updated successfully, but these errors were encountered: