更新日:

ReactNative Expoのプッシュ通知APIを叩く

package.json
{
  "dependencies": {
    "axios": "^0.26.0"
  }
}
index.js
const axios = require('axios');

const notification = async (title, body, uid) => {
  await axios.post(
    'https://exp.host/--/api/v2/push/send',
    {
      to: uid,
      title: title,
      body: body,
      priority: 'high',
      sound: 'default',
    },
    {
      headers: {
        'Content-Type': 'application/json',
      },
    }
  );
};