Skip to content
This repository was archived by the owner on Apr 15, 2020. It is now read-only.

ParsimoniousPeacock

Choose a tag to compare

@dxinteractive dxinteractive released this 11 May 04:34
· 7 commits to master since this release
  • Results from successful or errored operations are passed into each subsequent status as a result prop.
  • react-modal is now a peer dep, and by default the modal is not applied. This might be monorepo'd into another package in future
  • State is now stored in a separate component which is composed above the EntityEditorHock by default
  • redux/EntityEditorStateReducer and redux/EntityEditorStateRedux (hock) exist to store state in redux
  • Config has changed
    • Added: composeComponents key, a function that returns an array of components to compose.
    • The modal can be added via composeComponents
    • The statusOutput option in config has been removed.
    • Removed: prompt and promptContainer
import {BaseConfig, EntityEditorState, EntityEditorHock} from 'react-entity-editor';
import EntityEditorModal from 'react-entity-editor/lib/modal/Modal';

...

// to add a modal or use a different state storage hock, add this.
BaseConfig.merge({
    composeComponents: (config) => [
        EntityEditorState(config), // or EntityEditorStateRedux(config)
        EntityEditorHock(config),
        EntityEditorModal({
            appElement: "#body"
        }) // or your own Modal hock if you prefer
    ]
});