react-hookie
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Want a hookie? 🍪

Cleaning up react hooks

From:

const [firstname, setFirstname] = useState('Elon');
const [lastname, setLastname] = useState('Musk');
const [age, setAge] = useState(47);

To:

const initial_state = {
    firstname: 'Elon',
    lastname: 'Musk',
    age: 47
}

const { firstname, lastname, age } = useHookie(initial_state, useState)

Readme

Keywords

Package Sidebar

Install

npm i react-hookie

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

7.71 kB

Total Files

6

Last publish

Collaborators

  • jackall3n