<commit_before># RePress

RePress is a set of tools for developing React websites with WordPress via WordPress REST API.

It brings in three things:

- A way of connecting up React components to data from the WordPress API in a simple and seamless way.
- A set of simple components for common elements used in WordPress themes for you to use with this data.
- A boilerplate for writing projects with React and WordPress that provides a quick way into the process.

Behind the scenes RePress is using `redux` alongside `redux-saga` to handle data fetching and management.

You don't need to worry about this however. This complexity is more or less hidden from you and you can just get on with building your site with this data.

## Requirements On The WordPress Side

You need to have a working installation of WordPress that has the [WP REST API](http://v2.wp-api.org/) installed. That's it.

We have [a boilerplate]() for this based on [WordPress Bedrock](https://github.com/roots/bedrock) to get you started with all this set up.

## Requirements On The React Side

We assume that you are using React and [Redux](https://github.com/reactjs/redux) as an implementation of the Flux pattern.

If you want to avoid setting this up yourself we have a boilerplate [you can use]() with instructions on how to start a project. Its a universal application as well.

## Using RePress

First grab RePress using `npm`:

`npm install repress --save`

The follow example shows how to add the reducers provided by RePress to the reducers in your application. Examples add RePress to something like the [Redux examples](https://github.com/reactjs/redux/tree/master/examples/universal).

`reducers/index.js`

```js
import { combineReducers } from 'redux'
import { createRePressReducers } from 'repress';

// Is this going to cut it?
repressReducers = createRePressReducers({api: 'https://example.com/wp-api/v2/'});

const rootReducer = combineReducers({
  repressReducers
})

export default rootReducer
```

`stores/configureStore.js`

```js
import { createStore, applyMiddleware } from 'redux';

import { createSagaMiddleware } from 'repress';

import rootReducer from '../reducers'<commit_msg>Key bit of store by repress<commit_after># RePress

RePress is a set of tools for developing React websites with WordPress via WordPress REST API.

It brings in three things:

- A way of connecting up React components to data from the WordPress API in a simple and seamless way.
- A set of simple components for common elements used in WordPress themes for you to use with this data.
- A boilerplate for writing projects with React and WordPress that provides a quick way into the process.

Behind the scenes RePress is using `redux` alongside `redux-saga` to handle data fetching and management.

You don't need to worry about this however. This complexity is more or less hidden from you and you can just get on with building your site with this data.

## Requirements On The WordPress Side

You need to have a working installation of WordPress that has the [WP REST API](http://v2.wp-api.org/) installed. That's it.

We have [a boilerplate]() for this based on [WordPress Bedrock](https://github.com/roots/bedrock) to get you started with all this set up.

## Requirements On The React Side

We assume that you are using React and [Redux](https://github.com/reactjs/redux) as an implementation of the Flux pattern.

If you want to avoid setting this up yourself we have a boilerplate [you can use]() with instructions on how to start a project. Its a universal application as well.

## Using RePress

First grab RePress using `npm`:

`npm install repress --save`

The follow example shows how to add the reducers provided by RePress to the reducers in your application. Examples add RePress to something like the [Redux examples](https://github.com/reactjs/redux/tree/master/examples/universal).

`reducers/index.js`

```js
import { combineReducers } from 'redux'
import { createRePressReducers } from 'repress';

// Is this going to cut it?
repressReducers = createRePressReducers({api: 'https://example.com/wp-api/v2/'});

const rootReducer = combineReducers({
  repress: repressReducers
});

export default rootReducer
```

`stores/configureStore.js`

```js
import { createStore, applyMiddleware } from 'redux';

import { createSagaMiddleware } from 'repress';

import rootReducer from '../reducers'
{'fraction_non_alphanumeric': 0.07478340173278614, 'fraction_numerical': 0.0009119927040583675, 'mean_word_length': 4.42274412855377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1231439', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1189, 'n_words': 595}