react-izzi

1.0.8 • Public • Published

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.

  1. controller- contain a component lifecycle and our logic.
  2. 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:

view an example

Learn this light API in 5 min:

Use with Redux
Use with PropTypes

(controller) api:
displayName
state
construct()
didMount()
willMount()
willReceiveProps()
willUnmount()
didCatch()

learn more ...

(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)

Contributors:

1.Gherciu Gheorghe

How to contribute to this lib...

Package Sidebar

Install

npm i react-izzi

Weekly Downloads

2

Version

1.0.8

License

ISC

Unpacked Size

6.61 kB

Total Files

3

Last publish

Collaborators

  • wallki