trouble / react-wp-rest Goto Github PK
View Code? Open in Web Editor NEWA boilerplate for pairing the WP Rest API with a server-rendered React app
License: MIT License
A boilerplate for pairing the WP Rest API with a server-rendered React app
License: MIT License
We need to factor in draft previewing. Postlight's implementation does this nicely and we should follow suit.
We should remove WP REST API Cache plugin reliance seeing as how the SSR app should only be really polling from the WP API once and then caching into the server's Redux store.
As the repo sits now, our client fetches (and updates) the server Redux store on every single page load. That keeps everything fresh, but is not ideal because we're making those initial calls every time the server renders (and every time the client loads). We should check to see if the client store is populated before making API calls, and skip the call if it's populated.
If we modify the React app's code to check the store and skip calls if possible, that means we need to provide content editors within WP the ability to manually clear the Redux store cache, rather than clearing WP REST API cache.
Hey guys, really nice job here!
But you can take more care with the API side.
By using composer as dependency manager to manage all the required plugins and themes users/developers can have a way better development experience.
You'll probably need a separate repository for custom things like the REST-API theme, but I think that worth it.
Let me know what you guys think about it and if there's anything I can help you.
When I add a new page without publishing previewing that page does not work.
Played a bit with your stack and noticed that theres no data persistence when using docker. Was this intentional?
Hello,
This looks amazing! Exactly what I was looking for.
I got everything up and running until the WordPress Configuration step. I entered in http://localhost:1337 for both the Site and Home urls which I don't think I was supposed to do. Whamp whomp.
Now I can't access the site to finish the other config steps. To fix, I trashed the project, created a new directory and tried to do all of the install steps again but it's still routing me to http://localhost:1337 and since I haven't run the build yet, there's nothing there.
I've tried restarting Docker and creating a new project from scratch but it seems like it is grabbing the old db no matter what I do.
Where is the Docker container and the WP db located so I can edit it manually? Or what else can I try?
Thanks!
I'm loving this boilerplate and plan to use it as a start for a product app.
I had this totally up and running, then shut down my computer (mac) and cannot load the site - connection is refused on :8080. The page loads at :3000, but cannot connect to the data.
I am not sure where to start. Though I see this is a common problem after researching the issue, I want to look at it in the context of this boilerplate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.