@dol_design/redux-form-generate

0.0.2 • Public • Published

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>)

Readme

Keywords

none

Package Sidebar

Install

npm i @dol_design/redux-form-generate

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

16.5 kB

Total Files

7

Last publish

Collaborators

  • connorhoehn
  • nameer_rizvi
  • naomigrace