Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Beta 32, seems to more or less work #3

Open
mariusandra opened this issue Jun 17, 2019 · 3 comments
Open

Beta 32, seems to more or less work #3

mariusandra opened this issue Jun 17, 2019 · 3 comments

Comments

@mariusandra
Copy link
Member

Hi @etiennecl

I upgraded to the latest kea beta (.32) and configured the next.js app to more or less work.

The only issues still:

  • It doesn't wait for saga async actions to finish. This seems like one approach for it, but I'm wondering if there should be something more framework/plugin-specific that deals with it?
  • If you open a page (e.g. about), click to index and click back to about, it will have the server side initial props as a default value... and it will run its own initialprops again on top of that. With the increment code it looks weird, but I guess in a real app refreshing the data is not a bad thing and/or could be avoided with some simple conditionals

Let me know if this is already something you can work with :)

@etiennecl
Copy link

Hey @mariusandra

Sorry for the late response, I've been busy with work. I will definitely try to take a look at this. I've been looking at making the execution of async saga inside the getInitialProps but without success. Although i've successfully created a hoc for the App component making it possible to use kea inside _app.js and pages components getInitialProps.

I should be able to take a look at this next week using the rc release.

P.S: adding the hooks capabilities is really dope.

Cheers

@etiennecl
Copy link

Hey @mariusandra ,

I've been very busy with work lately, therefore I didn't had a chance to look at the latest RC release and making it compatible with nextjs. Have you got any chance to look into this on your side?

Cheers

@mariusandra
Copy link
Member Author

Hi, I think I got Kea (version 2.0.0-beta.7) working rather well with next.js

I wrote a guide about it on the new and yet unreleased docs page: https://kea-docs.netlify.app/docs/installation/nextjs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants