Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 2 KB

installing-the-us-forms-system-in-an-existing-application.md

File metadata and controls

38 lines (26 loc) · 2 KB

📖 US Forms System Documentation ➡️ Getting Started with the US Forms System

Installing the US Forms System in an existing application

If you're using an existing React application, you can install the US Forms System in that app.

Before you begin, review "Tools for getting started with the US Forms System."

In this guide

Install the library and dependencies

  1. Install the library:
npm install --save https://github.com/usds/us-forms-system.git
  1. Install the US Web Design System and React dependencies:
npm install --save-dev uswds@^1.6.3
npm install --save-dev react@^15.5.4
npm install --save-dev react-dom@^15.6.2

Create required files

To enable your form, create the following files. For an example of these files, see the us-forms-system-starter-app repository.

  • A form config file. For more information, see "Creating a form config file."
  • An entry app.js file.
  • A React component to render the top-level us-forms-system component.
  • A routes file that loads createRoutes from us-forms-system. This automatically creates the routes from the form config file.
  • A reducers file that loads createSchemaFormReducer from us-forms-system. This creates the app's reducer functions.

Back to Getting Started with the US Forms System