https://github.com/penx/pcp-form-example
Example of how to handle form components in a presentational component package
https://github.com/penx/pcp-form-example
Last synced: 3 months ago
JSON representation
Example of how to handle form components in a presentational component package
- Host: GitHub
- URL: https://github.com/penx/pcp-form-example
- Owner: penx
- Created: 2017-11-15T14:59:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T06:06:39.000Z (over 4 years ago)
- Last Synced: 2025-05-31T13:05:28.185Z (8 months ago)
- Language: JavaScript
- Homepage: https://medium.com/@penx/form-elements-in-presentational-component-packages-a618e9aa7416
- Size: 2.32 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Presentational Component Package - Form Example
An example of writing a presentational component package (PCP) that contains form components that can be used by redux-form without introducing a reliance on redux in the PCP.
Written to accompany https://medium.com/@penx/form-elements-in-presentational-component-packages-a618e9aa7416
## Architecture
This project contains 3 example node packages:
### Web server
A basic web server using Create React App, that loads in the React Application. This could be replaced with Express or similar.
### Application
The React Application. This handles application logic, redux state/actions/reducers and would also handle routing.
Note that the Application does not have references to DOM elements or CSS - it uses presentational-components for this.
### Presentational Components
A library of presentational React components.
Contains: CSS, HTML.
Does not contain: Application state/logic, redux.
## Running the Example
```
npm install
npm start
```