filter-rule-builder
v1.0.4
Published
Import css and component.
Downloads
9
Readme
How to use
Import css and component.
import RuleBuilder from 'rule-builder';
import 'rule-builder/dist/main.css';
<RuleBuilder state={[]}
actionProvider={actionProvider}
prepopulateEvents={true}
eventProvider={eventProvider}
attributeProvider={attributeProvider}
onChange={(state, isValid) => console.log(`Current state is: ${state}. isValid: ${isValid}`)} />
See [[RuleBuilderComponent]] for detailed documentation.
Available Scripts
In the project directory, you can run:
npm start
Runs webpack in development mode, watches changes and bundles code
npm run build
Builds the app for production to the dist
folder.
npm run docs
Generate documentation
Troubleshooting
In case you get following error 'hooks can only be called inside the body of a function component' You should add in Webpack following code to root level of config
resolve: {
alias: {
React: path.resolve('./node_modules/react'),
}
}