1.0.2 • Published 8 months ago

alertme-running v1.0.2

Weekly downloads
-
License
PROPRIETARY
Repository
github
Last release
8 months ago

alertme-running

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save alertme-running
yarn add alertme-running

Usage

  1. Import the necessary dependencies at the top of your React component file:
import React from 'react';
import { useAlertApp } from 'alertme-running'; //Adjust the route to the location of your hook
  1. Inside your functional component, call the hook useAlertApp:
import React, {useEffect} from 'react'

const Example: React.FC = () => {
    const {sendAlert} = useAlertApp();
    useEffect(() => {
      sendAlert({
        publicKey: "TU_CLAVE_PÚBLICA",
        templateId: "TU_ID_DE_PLANTILLA",
        serviceId: "TU_ID_DE_SERVICIO",
    });
}, []);
    return <></>
}

Replace YOUR_PUBLIC_KEY, YOUR_PLANT_ID and YOUR_SERVICE_ID from emailjs with the actual values you want to use to send the alert.

Note: Be sure to adjust the dependency array in the useEffect according to your specific use case. The above example uses an empty array to indicate that the effect will be executed only once after the component is mounted.

License

PROPRIETARY © jsnavarroc

1.0.2

8 months ago

1.0.1

9 months ago

1.0.0

9 months ago