1.0.6 • Published 6 years ago
onesignal-custom v1.0.6
Onsignal
How to setup
npm install --save onesignal-custom
With ReactJS In src/index.js
import { OnsignalEmp } from 'onesignal-custom' exprort const onesignal = new OnsignalEmp()
onesignal.setOptions({ app_id: "APP_ID", basic_key: "API_AUTH_ID" }) ReactDOM.render(...);
In component src/App.js
class App extends Component { componentDidMount(){
<!-- View list notifications -->
onsignal.viewNotifications({ limit:10, offset:0 }).then(r=>console.log(r)) .catch(err=>console.log(err)) } render() { return (
With Angular project
Allow "regeneratorRuntime" In src/polyfills.ts
import "babel-polyfill";