useState in Freshworks?

Yo.

Have a client that want to us to do certain businesslogic based on the company_id.

  1. Fetch the company_id for Company A with client.data.get(“contact”)

  2. Only show contacts from Company A
    based on the api documentation I found this => /api/v2/contacts?company_id=<company_id>

  3. In this domain, more companies are connected; Company B, Company C, Company D…
    However, Company A should only see Company A´s contacts.

(In the future we want to use the other_companies to build more contacts between companies)

Questions:

Is there a State function built in Fresh? Similair to useContext in React?

My idea was that in order to start building this, needed a serverless apps? However, couldn´t find a good event to fire my logic?