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

0.0.5Β β€’Β PublicΒ β€’Β Published

react-slack-webhook

πŸ“’ Send a message directly to a Slack channel from a React app

downloads npm version MIT license Coverage Status


πŸ“¦ Installation

$ npm install react-slack-webhook
$ yarn add react-slack-webhook
$ pnpm add react-slack-webhook

πŸš€ Usage

import { Slack } from 'react-slack-webhook';
import { SLACK_WEBHOOK_URL } from '@/constants'

...
const onClick = () => {
  const slack = new Slack(SLACK_WEBHOOK_URL)

  return slack.send({
      text: 'hello, world',
      channel: '#channel',
      username: 'bot',
      icon_emoji: ':robot_face:',
  })
}
...

More Example


🎈 Props

Key Default Type
text "hello, world" string
channel "#general" string
username "bot" string
icon_emoji ":robot_face:" string

πŸ“ License

MIT. Made with ❀️ by cmg8431

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    1
  • 0.0.4
    2
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i react-slack-webhook

Weekly Downloads

3

Version

0.0.5

License

MIT

Unpacked Size

10.7 kB

Total Files

6

Last publish

Collaborators

  • cmg8431