Is using Google Pub/Sub possible on the frontend (React)

Asked
Active3 hr before
Viewed126 times

5 Answers

googlereactusing
90%

Is it possible for everything that exists to have a definition? ,I'm fairly new to things that aren't strictly front end, so after reading the Google pub/sub docs and doing a few searches its not clear to me whether using it with react is possible. , About

Pretag
 Pretag team - issue, fix, solve, resolve
88%

The library author originally envisioned it being implemented in the global space within an application, using a script tag in the html. Still, the author made the package available via NPM.,If you’re like me and don’t like to use the global space for anything, then this is not ideal. At the same time, you definitely do not want to import LSBridge in multiple files, and potentially implement multiple instances. This would have the potential for your messages to not actually find their way to their subscribers.,If you’re thinking this is a good candidate for a decorator, you are correct.

Pretag
 Pretag team - issue, fix, solve, resolve
72%

With Kotlin on both the client and server side, generally using React and a JVM, respectively, it’s possible to share some code directly, like generic business logic and data classes. It’s also possible to leverage existing competencies in Kotlin for a team developing a vertical application stack.,Have you used Kotlin/JS on the server side with Node.js? Do you find this interesting and wish to hear more? Please feel free to leave a comment about this post or things that you find interesting/promising in regards to Kotlin and Kotlin/JS on Google Cloud Platform!,Open either IntelliJ IDEA or Android Studio and create a Kotlin/JS project targeted at Node.js. As of this time, the new IR compiler is still experimental, so I recommend using LEGACY to keep things simple. (By the time you read this, that may not be the case.)

Pretag
 Pretag team - issue, fix, solve, resolve
65%

The frontend is a React app hosted on Firebase and it uses a Firestore NoSQL database to store specifications of what we call Orders. An Order is a specification of what data should be shipped where, and at what interval.,Finally we arrive at the really neat part of this whole setup. The React components in our Frontend, that are coupled to and represent the data stored in documents in the Firestore database, will automatically be refreshed when that document is updated. No need for that pesky refresh button anymore!,Here is a short demo of how this looks in action, using a dummy Order that is scheduled to trigger every two minutes. As you can see we can follow it through all oif its states in real time from its creation to completion. No more wondering whether the Order you look at is up to date and showing its most current state.

Pretag
 Pretag team - issue, fix, solve, resolve
75%

legacy-8: install client libraries from this dist-tag for versions compatible with Node.js 8.,Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.,Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm dist-tags. The dist-tags follow the naming convention legacy-(version).

🤖
I have created a release\ * beep\ * \ * boop\ *
   -- -
   # # #[2.16 .6](https: //www.github.com/googleapis/nodejs-pubsub/compare/v2.16.5...v2.16.6) (2021-08-19)

      # # # Bug Fixes

      *
      don 't require a `data` attribute to be passed when sending a message ([#1370](https://www.github.com/googleapis/nodejs-pubsub/issues/1370)) ([97fd4f0](https://www.github.com/googleapis/nodejs-pubsub/commit/97fd4f041c195e0388b0613b2cf9710b89ab4e15))
      -- -

      This PR was generated with[Release Please](https: //github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
load more v

Other "google-react" queries related to "Is using Google Pub/Sub possible on the frontend (React)"