How to interact with realtimeAPI inside React app

How do I interact with Realtime Api inside my react app ?

I have been trying to connect with different ways, but they don’t seem to work inside React app.

Can I use @rocketchat/sdk for realtime api ?

I am able to use { api } from this sdk to interact with REST-api, but { driver } doesn’t work for Realtime api, I get net.connect() is not a function while trying to connect.

Github Issue: driver.connect() not working · Issue #136 · RocketChat/Rocket.Chat.js.SDK · GitHub