Where communities thrive
your own community
Explore more communities
A React Redux toolset for the WordPress API
There is no reason to duplicate the data in two places in the store.
Yep, I think that - or something similar, like
- is what I'll need to do. Should have thought twice about storing the entire object in two places...
Have you guys ever implemented infinite scroll?
I would like to be able to trigger another query but not sure how to do that exactly.
Digging through the code...
So redux/actions.js has them.
But kasia doesn't export them.
So, thinking about the preload design. With react router v4 there isn't a great way to walk the whole component tree.
So hard to know what preloaders to call.
I am managing this with careful engineering around what can be connected with Kasia.
But I was thinking, why doesn't kasia have a 'registry' that can be turned on for server rendering.
And just store all the queries in the registry.
Or I guess a way to store all the tasks.
And then when kasia is done rendering you can ask it to join all tasks that were generated.
Won't have time to dig into that for a few weeks but I think it would work.
Hey Nick- do you mean that when someone uses the
fns that Kasia would keep an internal record of the respective functions? I like that
But you lose the ability to know which queries to fire off depending on a route?
So with react v4 you loose the ability to know all the components in the tree because routing can happen at multiple levels.
When you render the routing all figures out what to render and everything just works.
The problem is that there is no way to tell the server to wait for the query tasks to finish.
I guess you would end up doing a two render pass then though which is not ideal.
First pass you would get the "Loading" page which is probably not what you want.
So then when all queries finished you would rewind Kasia and do another render.
What I am doing now is hoisting sub component pre-renders.
And only allowing components one level deep to connect.
But this is less than ideal.
So, I think we need to think about the connection between queries and creators.
I just did commenting on posts for the first time and it was harder than it should be.
Once a comment is created I had to do some work arounds to get the query for all comments to re-run.
And even that isn't really ideal.
Yeah kasia doesn't provide any api for those kinds of api interactions
It is something that has been on the backlog for some time
If you have time I would love to collaborate with you on implementing this kind of functionality