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

#182 SSR data is shared #375

Merged
merged 14 commits into from
May 5, 2021
Merged

#182 SSR data is shared #375

merged 14 commits into from
May 5, 2021

Conversation

Munawwar
Copy link
Contributor

@Munawwar Munawwar commented May 1, 2021

No description provided.

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 1, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3d882e3:

Sandbox Source
React Configuration
React Typescript Configuration

@Munawwar Munawwar changed the title Issue 182 ssr #182 SSR is shared May 1, 2021
@Munawwar
Copy link
Contributor Author

Munawwar commented May 1, 2021

Pending work & questions:

  • there is a FIXME on context.ts, on useStore's type assertion. Seems like an issue with existing type for useStore?
  • Update README on how to use the new context APIs. I'd like someone to help me out here.
  • Should we add a next.js example folder in the repo? or should we just add a link to the next.js canary repo?

I will try to add example to next.js canary repo after we release this.

@Munawwar Munawwar changed the title #182 SSR is shared WIP: #182 SSR is shared May 1, 2021
@Munawwar Munawwar marked this pull request as draft May 1, 2021 08:17
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Some early feedbacks.

src/context.ts Outdated Show resolved Hide resolved
src/context.ts Outdated Show resolved Hide resolved
src/context.ts Outdated Show resolved Hide resolved
src/context.ts Outdated Show resolved Hide resolved
@dai-shi
Copy link
Member

dai-shi commented May 1, 2021

Should we add a next.js example folder in the repo? or should we just add a link to the next.js canary repo?

I think just adding a link is fine, assuming we update the example in the nextjs repo.

@Munawwar
Copy link
Contributor Author

Munawwar commented May 1, 2021

@dai-shi Ah, sorry.. I didn't push my changes properly last time (some last minute force push removed my new changes). Can you check again?

@Munawwar Munawwar changed the title WIP: #182 SSR is shared WIP: #182 SSR data is shared May 1, 2021
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Overall it looks good! Added some comments.

src/context.ts Outdated Show resolved Hide resolved
src/context.ts Outdated Show resolved Hide resolved
tests/context.test.tsx Outdated Show resolved Hide resolved
tests/context.test.tsx Show resolved Hide resolved
src/context.ts Outdated Show resolved Hide resolved
that accepts useStore func/object from create().

This is needed as store access is needed for merging/memoizing, in next.js integration
@Munawwar Munawwar changed the title WIP: #182 SSR data is shared #182 SSR data is shared May 2, 2021
@Munawwar Munawwar marked this pull request as ready for review May 2, 2021 18:39
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

Looks good to me. Nice work.

@dai-shi dai-shi linked an issue May 2, 2021 that may be closed by this pull request
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.

SSR Example (SSR data is shared)
2 participants