Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

izitoast-react

1.0.16 • Public • Published

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.

Install

npm i izitoast-react

DownloadsWeekly Downloads

24

Version

1.0.16

License

Apache-2.0

Unpacked Size

876 kB

Total Files

26

Last publish

Collaborators

  • avatar