|
|
A PubSweet component is a [Node.js](https://nodejs.org/api/modules.html) module that can extend or change functionality of the [server](/Introduction: server) and/or [client](/Introduction: client) of a PubSweet app.
|
|
|
|
|
|
Components build on the core modules to provide the actual functionality of a PubSweet app. By combining the components you need, you can build any publishing platform or workflow you can imagine.
|
|
|
|
|
|
Start using them straight away, or see how components work with an example.
|
|
|
|
|
|
#Next steps
|
|
|
Learn how to use components in your app.
|
|
|
Take a look at the component library to see what existing components can do
|
|
|
See our component developer guide to learn how to create your components.
|
|
|
#An example: user login
|
|
|
The login component provides basic user login functionality in the client. It does this by exporting:
|
|
|
|
|
|
redux actions for authenticating and de-authenticating users with the server
|
|
|
redux reducers for managing user data and authentication tokens
|
|
|
a React login form that provides a login interface and uses the login redux actions and reducers
|
|
|
a default style for the form
|
|
|
You can install the login component and instantly have login functionality in your app. You can also pick and choose which parts of the component you use. You example you could build your own React login form and still make use of the redux actions and reducers from the login component, or keep the existing form but provide a new style.
|
|
|
|
|
|
**UI Components**
|
|
|
|
|
|
A list of UI components that can be used can be found [here](https://ui-demo-ypx34u.gateway.ps.semioticsquares.com/).
|
... | ... | |