Giter Site home page Giter Site logo

trouble / react-wp-rest Goto Github PK

View Code? Open in Web Editor NEW
168.0 12.0 27.0 10.69 MB

A boilerplate for pairing the WP Rest API with a server-rendered React app

License: MIT License

PHP 66.96% CSS 8.19% JavaScript 24.77% HTML 0.08%
wordpress react docker headless-cms headless-wp wp-rest-api nodejs express redux react-router-v4

react-wp-rest's People

Contributors

dimafeldman avatar eliasaj92 avatar jacobsfletch avatar jmikrut avatar nathanlschneider avatar zubricks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-wp-rest's Issues

Use composer as dependency manager on API side

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.

Gutenberg CORS issues

I am now getting Gutenberg CORS errors, and so am unable to update or publish posts / pages. This appears to be very common out there, and may be related to diff site and WP urls.

The error:
screen shot 2018-12-21 at 2 04 26 pm

The cors.php file looks fine. Any other ideas?

Connection Refused

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.

Thanks in advance!
screen shot 2018-12-14 at 9 20 15 am

Remove WP REST API Cache, build custom plugin that clears Redux store

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.

Database help - changed Site *and* Home address, now can't continue setup.

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.