PubSweet

Client

npm MIT license build status

The pubsweet-client module creates the app that runs in the user's browser. It handles the user interface, routing, and optionally state management.

User interface

pubsweet-client is a React app. In general any React components should just work in a PubSweet app.

The PubSweet client uses JSX. This means the client must be transpiled to plain JS. However, a PubSweet app in general can be extended without using JSX, so you don't need to learn JSX to use PubSweet.

Routing

pubsweet-client uses react-router for routing between views of an app.

By convention we store routes in app/routes.jsx.

Adding or modifying routes involves simply editing the routes.jsx file.

State management

Redux is used for app-wide state management. Redux uses actions to handle spawning state-changing effects, and reducers to handle updating the state based on the outcome of actions.

pubsweet-client includes some actions and reducers for sending information to the pubsweet-server REST API and applying the results to the Redux state.

Any component can also manage its own state using internal variables, and choose not to interact with the Redux store at all.


Next let's talk about the command line interface