izitoast-react

A wrapper for izitoast by @marcelodolza

Usage no npm install needed!

<script type="module">
  import izitoastReact from 'https://cdn.skypack.dev/izitoast-react';
</script>

README

izitoast-react

A react wrapper for izitoast with react hooks

NPM JavaScript Style Guide

Install

npm install --save izitoast-react

Usage

import * as React from 'react'

import { useToast, immediateToast } from 'izitoast-react'

const App = () => {
  const showMessage = useToast({
    message: 'Show my message :)',
  });

  useEffect(() => {
    immediateToast('info', {
      message: 'Hi, how it is going'
    })
  });


  return (
    <div>
      <button onClick={showMessage} >Show</button>
    </div>
  )
};

Demo : CodeSandbox

License

React wrapper sayjeyhi Apache-2.0 © marcelodolza


This hook is created using create-react-hook.