Skip to content

[DX-285] React Native guide#3228

Draft
maratal wants to merge 17 commits intomainfrom
DX-285-react-native-guide
Draft

[DX-285] React Native guide#3228
maratal wants to merge 17 commits intomainfrom
DX-285-react-native-guide

Conversation

@maratal
Copy link
Collaborator

@maratal maratal commented Feb 26, 2026

Description

React Native web push notifications tutorial.

Checklist

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1cd0facd-c0cd-49f7-b04f-d7aa8b85bccf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch DX-285-react-native-guide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maratal maratal changed the base branch from main to DX-286-kotlin-push-guide February 26, 2026 23:31
@maratal maratal added the review-app Create a Heroku review app label Feb 26, 2026
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if February 26, 2026 23:32 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 14:28 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 17:54 Inactive
@maratal maratal force-pushed the DX-285-react-native-guide branch from 473e3a0 to 31c16f7 Compare March 1, 2026 19:51
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 19:51 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 20:39 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 21:11 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 22:27 Inactive
@maratal maratal force-pushed the DX-285-react-native-guide branch from 55ea18f to 5b431eb Compare March 1, 2026 23:56
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 1, 2026 23:56 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 2, 2026 01:13 Inactive
@ably-ci ably-ci had a problem deploying to ably-docs-dx-285-react--62f9if March 2, 2026 01:21 Failure
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 2, 2026 01:57 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 2, 2026 10:03 Inactive
@maratal maratal force-pushed the DX-285-react-native-guide branch from 09bc9fb to f86cf42 Compare March 2, 2026 10:31
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 2, 2026 10:31 Inactive
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 2, 2026 11:46 Inactive
@maratal maratal force-pushed the DX-285-react-native-guide branch from 7db79f5 to 4de286b Compare March 2, 2026 15:10
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 2, 2026 15:10 Inactive
@maratal maratal force-pushed the DX-286-kotlin-push-guide branch from 789d8eb to 02ac81e Compare March 4, 2026 13:07
@maratal maratal force-pushed the DX-285-react-native-guide branch from 4de286b to 60d24d8 Compare March 4, 2026 13:08
@ably-ci ably-ci temporarily deployed to ably-docs-dx-285-react--62f9if March 4, 2026 13:08 Inactive
@GregHolmes GregHolmes force-pushed the DX-286-kotlin-push-guide branch from 02ac81e to 9942418 Compare March 5, 2026 11:25
Base automatically changed from DX-286-kotlin-push-guide to main March 5, 2026 11:38
@maratal maratal requested a review from GregHolmes March 5, 2026 13:18
maratal and others added 2 commits March 6, 2026 13:37
Three fixes discovered while running the app:
- Use Gradle 8.13 (not 8.8) for RN 0.84 compatibility; add troubleshooting note
- Declare POST_NOTIFICATIONS in AndroidManifest.xml (was missing)
- Use notifee.requestPermission() on Android instead of PermissionsAndroid
  for consistent behavior across API levels

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@GregHolmes GregHolmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a couple comments.

```react
// Generate a unique device ID for this installation
const [deviceId] = useState(
`push-tutorial-${Platform.OS}-${Math.random().toString(36).slice(2, 9)}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random device ID is a bit fragile, is it worth having an Aside or comment here stating that this is for demo purposes? Otherwise every restart creates a new device registration with Ably, orphaning the previous one.


## Step 5: Send push with code <a id="step-5"/>

You can send push notifications directly from your app using `deviceId`, `clientId`, or channel publishing. Channel publishing does not require the `push-admin` capability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bit misleading to say channel p ublishing does not require the push-admin capability? Publishing to a channel requires publish capability but the extras.push field in the message payload still requires push rules to be configured on the channel. (stated in prerequisite 4). Just wondering if this will confuse readers into thinking that no special set up is required for push.

</Code>

<Aside>
At the time of writing React Native 0.84's Gradle plugin is not compatible with Gradle 9. If you see a `JvmVendorSpec.IBM_SEMERU` error during the Android build, update `android/gradle/wrapper/gradle-wrapper.properties` to use Gradle 8.13: `distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioning ReactNative 0.84 specifically is likely to result in it being outdated quickly. Is it worth being more general here or noting that this is the RN version at the time of writing this guide?

```
</Code>

<Aside>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has no data-type attribute. All asides should. It could just be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

3 participants