use-async-toggle

A React toggle hook with support for async actions

Usage no npm install needed!

<script type="module">
  import useAsyncToggle from 'https://cdn.skypack.dev/use-async-toggle';
</script>

README

useAsyncToggle

  • A react.js toggle hook with support for async actions
  • demo with usage can be found at: https://use-async-toggle.vercel.app/
  • detailed implementation with a NextJS application can be seen at the /example/pages/index.js