React native Support
Hi Team, is it possible to listen for incoming in-app notifications in my react native app using the socket URL https://ws.novu.co
without using the SDK?
8 Replies
Hi @Tria, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* API Reference
* Building a real-time bidding system with Socket.io and React Native - Novu
* Building a chat app with Socket.io and React Native - Novu
* [NV-3043] Feature: react-native support for Headless JavaScript Service
-----------------------------
Answer
Yes, you can listen for incoming in-app notifications in your React Native app using the Novu socket URL
https://ws.novu.co
without directly using the SDK. As mentioned in a Discord conversation, you can directly connect to the Novu WebSocket server using a socket client in React Native. The WebSocket URL you provided is correct and can be used for this purpose. You can listen to events similar to those listed in the documentation for React components, such as notification_received
(1) .
However, please note that while Novu's notification center is not directly compatible with React Native, you can use pure Socket client methods to connect and listen for notifications. This approach requires building a custom notification center in your React Native application.
For more detailed guidance on working with WebSockets in React Native, you might find the documentation on building real-time applications with Socket.io and React Native helpful (2) (3) .@Tria
Although we don't support react native officially. I will check with team on how ws url can be used
sure @Pawan Jain, also can you please expected timeline because right now we are blocked as we can't able to inegrate in our react native app
@Tria
I can confirm that it is not possible to directly use our websocket url
because it requires auth token to authenticate the requests
which can be generated only in our client side sdk
got it! Could you please provide an estimated timeline for when support might be available?
@Tria, you just advanced to level 1!
Sorry, but I cannot share the exact ETA about react native support
because we have not included react native yet in our planned roadmap