GithubHelp home page GithubHelp logo

dreyskee / wp-api-react Goto Github PK

View Code? Open in Web Editor NEW
252.0 13.0 65.0 19 KB

This boilerplate will help you use React JS with Wordpress REST API.

Home Page: https://medium.freecodecamp.com/how-to-build-react-apps-on-top-of-the-wordpress-rest-api-bcc632808025#.tkbzho7ms

HTML 1.07% JavaScript 98.93%
webpack reactjs wordpress wordpress-api

wp-api-react's Introduction

Wordpress REST API + React JS

This boilerplate will help you use React JS with Wordpress REST API. Clone the project and install node packages:

npm i

To run the project on localhost:8080:

npm start

To build the project into /build folder:

npm run build

You need to have webpack and webpack-dev-server installed globally:

npm install -g webpack
npm install -g webpack-dev-server

Don't forget to update the Worpress installation url in DataActions.js. It's located in src/actions/DataActions.js line 7

class DataActions {
	constructor() {
		const appUrl = 'http://andreypokrovskiy.com/projects/wp-api'; // Wordpress installation url
	}

wp-api-react's People

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  avatar

wp-api-react's Issues

Getting page slug dynamically

When visiting a slug without a page template/component, no content is shown. (e.g. site.com/my-custom-page) How can we get page specific data dynamically without creating a page component and manually providing current page slug?

How to run the production code?

I'm using npm run build, but am I supposed to just use the index.html file that's created inside the build folder? Or do I need to run another webpack command after to boot it up? I'm trying to deploy it to heroku

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.