A utility for turning raw BBCode into React elements.
Install bbcode-to-react and peer dependencies via NPM
npm install --save bbcode-to-react reactImport bbcode-to-react, example:
import React from 'react'; import parser from 'bbcode-to-react'; const Example = (props) => { return ( <p>{parser.toReact('[b]strong[/b]')}</p> ); }Install dependencies:
npm installRun examples at http://localhost:8080/ with webpack dev server:
npm startRun tests & coverage report:
npm testWatch tests:
npm run test-watch