v2.0.0
jsx-slack v2 has improved JSX structure and built-in components to output the real JSON from JSX!
▶︎ See highlight of v2 updates
Breaking
- Checked states defined in
<CheckboxGroup values>and<Checkbox checked>do no longer merge
- Breaking for TypeScript
- Require TypeScript >= 3.7 when using jsx-slack through TypeScript
- Container components have strict type checking for its children
- Exported type
JSXSlack.ChildandJSXSlack.Childrenhave been renamed intoJSXSlack.ChildElementandJSXSlack.ChildElementsand no longer provided generics
Changed
- Fully rewrote JSX structure to render from JSX to JSON directly (#128)
- All built-in components can render the partial JSON of Block Kit
<Home>container now accepts<Input type="hidden" />and custom transformer to store private metadatavalueprop for<Option>has made optional to follow HTML specificationconfirmprop for interactive block elements accepts the raw confirm composition object<a>tag renders short syntax for hyperlink if possible- Throws error with more helpful message and stacktrace when there is invalid JSX structure (#143)
- Bundle modules through rollup (#144)
Added
- React-compatible public APIs:
JSXSlack.createElement,JSXSlack.isValidElement, andJSXSlack.Childrenhelpers - HTML-compatible
<Option selected>and<RadioButton checked> valueprop as an alias intoinitialXXXprop in some interactive components- Added JSDoc to many public APIs and components
- Support new JSX transpile via
automaticruntime in Babel >= 7.9 (experimental) (#142) - REPL demo now generates the permalink to specific JSX (#149)
- Dark mode for REPL demo (#150)
- New logo and logo type (#152)
Fixed
- Suggest string literals on IDE when typing the kind of conversation in
<ConversationsSelect include>(#145) - Fix typo in
README.md(#146 by @nicosachse)
Removed
- Deprecated features in v1:
JSXSlack.legacyParser()andjsxslack.fragment
Deprecated
jsxslack.rawtemplate literal tag (It has become just an alias tojsxslackin v2)