> A tool to create demos for your ReScript React components
npm install @ahrefs/reshowcase⚠️ this is a fork of original tool with rescript-react migration reverted, reason-react is used instead ⚠️
> A tool to create demos for your ReScript React components
``rescript
open Reshowcase.Entry
// Create a demo
demo("Title", ({add}) => {
// Add an example
add("normal", ({string}) =>
// Register "handles" from your JSX directly
},
(),
)}>
{string("text", "hello")->React.string}
)
})demo("Button", ({add}) =>
add("normal", ({string, bool}) =>
)
)
start()
`Install
`console
yarn add --dev reshowcase
`Then add to your
"reshowcase" to bs-dependencies in your bsconfig.json.> If you're still using JSX 2, install
reshowcase@1.4.0.Usage
$3
`console
$ reshowcase start --entry=path/to/Demo.bs.js
`$3
`console
$ reshowcase build --entry=path/to/Demo.bs.js --output=path/to/bundle
`If you need custom webpack options, create the
.reshowcase/config.js and export the webpack config, plugins and modules will be merged.If you need a custom template, pass
--template=./path/to/template.html`.