-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(SSR) - enable SSR with redux - WIP #84
base: develop
Are you sure you want to change the base?
Conversation
fbdc2d9
to
384adbb
Compare
387ee75
to
a7d6c53
Compare
34841fc
to
ef2631b
Compare
d8ffa69
to
c51e388
Compare
|
||
const { feedsMarkersContent, isLoading } = useActionMarkers() | ||
if (googleMapApiIsLoaded) { | ||
const hasNotLoadedFromSSR = !actionId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi on a besoin de faire ça exactement ?
Normalement même si le composant se charge dans une page qui n'a pas été chargé par le serveur, on va quand même avoir le getInitialProps
de la page qui sera appelé
// TODO | ||
// it.skip('should remove user token on logout', () => {}) | ||
// TODO fix test | ||
it.skip(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fixer avant le merge
@@ -1066,6 +1097,7 @@ describe('Auth User', () => { | |||
authUserSensitizationStorage.getHasSeenPopup.mockReturnValueOnce(false) | |||
|
|||
store.dispatch(publicActions.setUser(user)) | |||
store.dispatch(publicActions.initUser()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est bizarre d'avoir initUser
après setUser
, il faudrait peut être renommer initUser
pour que ça soit plus précis comme action ?
this.store = store | ||
this.persistor = persistor | ||
if (!isSSR) { | ||
CookiesAuthUserTokenStorage.initToken().then() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je crois qu'on avait vu qu'il n'y avait pas besoin du then
CookiesAuthUserTokenStorage.initToken().then() | |
CookiesAuthUserTokenStorage.initToken() |
// Wait until React Queries support SSR. Coming soon | ||
// see https://github.com/tannerlinsley/react-query/issues/14 | ||
// } | ||
const Actions: StatelessPage<Props> = () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi on a 2 composants dans une même page ?
@@ -1,5 +1,5 @@ | |||
import React from 'react' | |||
import { Messages, useEntourageUuid } from 'src/containers/Messages' | |||
import { Messages as MessagesComponent, useEntourageUuid } from 'src/containers/Messages' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pas de composant qui s'appelle Component
, ça ne le distingue pas plus d'un autre
</PrivateRoute> | ||
</> | ||
) | ||
} | ||
|
||
export default MessagesPage | ||
const Messages: StatelessPage<Props> = () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi on a 2 composants dans une même page ?
// Wait until React Queries support SSR. Coming soon | ||
// see https://github.com/tannerlinsley/react-query/issues/14 | ||
// } | ||
const POIs: StatelessPage<Props> = () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
}) | ||
} | ||
|
||
export default connect((state: AppState) => state)(Action) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pourquoi on a besoin de connect ici ?
No description provided.