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

Improve handling of time #347

Closed
wants to merge 3 commits into from
Closed

Conversation

ismailToyran
Copy link
Contributor

@ismailToyran ismailToyran commented Jul 20, 2023

Project organization

Description

Uses useConst hook from Chakra to get mountTime on _app.tsx file and spread that across the app.
https://chakra-ui.com/docs/hooks/use-const

Checklist

  • Base branch of the PR is dev

@ismailToyran ismailToyran linked an issue Jul 20, 2023 that may be closed by this pull request

function MyApp({ Component, pageProps }: AppProps<MyAppProps>): JSX.Element {
const mountTime = useConst(() => new Date())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antho1404 what do you think about this usage?
Am I missing something on _document.tsx file that this now is required there?
Simply having one mount time and spreading this Date should fix the issues right?

Copy link
Member

Choose a reason for hiding this comment

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

that sound interesting, I didn't know about that. I am worried that this will not be shared between ssr and client but I will do some tests

@ismailToyran ismailToyran self-assigned this Jul 20, 2023
@ismailToyran ismailToyran requested a review from antho1404 July 20, 2023 10:48
@ismailToyran
Copy link
Contributor Author

Closing in favor of #432
Will continue working on this PR

@NicolasMahe NicolasMahe deleted the improve-handling-of-time branch September 28, 2023 10:28
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.

2 participants