jackreichert / a-wp-react-redux-theme

WordPress theme built with ReactJS and Redux calling WP-REST-API for content
GNU General Public License v3.0
332 stars 100 forks source link

Question about Routing (+ Redux?) #7

Open Friends-for-Brands opened 6 years ago

Friends-for-Brands commented 6 years ago

Hi there, I've got a question about your routing, and I guess it also has to do something with redux.

I'm also busy trying to make a Wp + React + Redux app, but you've a different kind of routing than I have.

In your app: when I click a post -> I got a small delay (redux is loading the content) -> When redux is done loading content, I navigate to the next route.

In my app: when I click a post -> I IMMIDIATELY go to the next route -> Because Redux hasn't loaded anything yet I see a blank page (I can display a loader or smth) -> when Redux has loaded content it displays te content.

I think your way it better, because then I won't have to show a loader at any page.

Do you understand my question? And can you explain how you have achieved this?

Thanks!

jackreichert commented 6 years ago

Hi @AndasDev,

I'm not sure what your question is. But happy to discuss any specifics of what I did if you like.