Redux Form Generate
Installation
git clone #
//build server
yarn install;
//dev server
cd ./app;
yarn install
Special Instructions
To develop the library and have a sample project running an app directory was created with the minimum redux-form boilerplate.
cd ./ # go into the package directory
yarn link # creates global link
cd ./app # go into the app directory.
yarn link @dol_design/redux-form-generate # link-install the package
...
cd ./; yarn watch #Start the build server
cd ./app; yarn server #Start the dev server
Development Suite
Start Server Command:
yarn server
Development: The /src directory is the domain for developing the logic to generate the form
- The default export is a function that returns an instance of the Form Generator component
- addExtension() allows modules to insert components that will be used to render the form components
- addSchema() is required to generate a form layout
The /app directory is a skeleton react app that can be used in tandem for the library development
- Contains redux form
- Header, Footer, and Main layout
- Use the Main component as the integration point
The intended usage of the library looks like this:
# import library
import FormGeneratorFactory from "../../src/index";
# get instance of form generator
let generator = FormGeneratorFactory();
# add implementation-specific schema
generator.addSchema({
"pages": [
{
"title": "Page One2"
}
]
});
# add components to be used internally by the generator during the render process
generator.addExtension({
"title" : () => <Fragment>Hello</Fragment>,
"fields: {
"text" : MyCustomTextFieldComponent
"password" : MyCustomPasswordFieldComponent
}
});
return (<Fragment>
{generator.renderForm()}
</Fragement>)