🍷 Klaso
A functional alternative to stateful components in React.
Install
yarn add klaso
Examples
Basic
const MyButton = <button onClick=inc>count</button> const MyButtonEnhanced = MyButton
Using Lifecycles
const MyButton = <button>Click me</button> const MyButtonEnhanced = MyButton
Changelog
- v.1.2.1 -- Dec 5, 2018
- Added init function that runs in the constructor
- v.1.2.0 -- Sept 16, 2018
- Fixed error "Cannot call class as a function" error when composing multiple HOC's
- Fix display names for stack traces and react dev tools
- New feature to override display names by passing it through the config as
displayName