1.0.8 • Published 6 years ago
react-izzi v1.0.8
react-izzi
npm i --save react-izzi
react-izzi split our react-component in 2 parts (controller & view) to utilize this parts in diferents components.
- controller- contain a component lifecycle and our logic.
- view- contain a component jsx
How to use
import {compose} from 'react-izzi';
const controller = {
didMount:()=>{
console.log('Component did mount')
}
}
const view = () => <div>Hello this is my component</div>
const MyComponent = compose(controller)(view);
export default MyComponent;
How to reutilize and combine components parts:
Learn this light API in 5 min:
Use with Redux Use with PropTypes
(controller) api: displayName state construct() didMount() willMount() willReceiveProps() willUnmount() didCatch()
(view) api: ceck examples how to use corect views ...
Users:
1.Wallki
if you use this lib open the PR and ad your company name and url in alphabetical order (please)