1.1.1 • Published 4 years ago
multipack-with-react v1.1.1
Getting started
- Install:
npm i multipack-with-react
import React from 'react'
import useCounter from 'multipack-with-react'
const App = () => {
const { count, increment, decrement } = useCounter(0)
return (
<div>
<button onClick={decrement}>-</button>
<span>{count}</span>
<button onClick={increment}>+</button>
</div>
)
}
Or use via cdn:
<!--index.html-->
<script src="https://cdn.jsdelivr.net/npm/multipack-with-react@latest/build/index.js"></script>
<script>
const App = () => {
const { count, increment, decrement } = multipackWithReact(0)
return (
<div>
<button onClick={decrement}>-</button>
<span>{count}</span>
<button onClick={increment}>+</button>
</div>
)
}
</script>
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Or you can sponsor via Open Collective
Author
@Gherciu/multipack © GHERCIU, Released under the MIT License. Authored and maintained by GHERCIU with help from contributors (list).