back to catalog
ReactSample App
works in free trial | Built on

React Starter App Get code

Code by ThoughtSpot

This app is an example react-based app for embedding ThoughtSpot elements using the Visual Embed SDK. It is designed to work with the Sample Retail Apparel dataset included with the ThoughtSpot Free Trial account.

It contains example code for:

  • basic authentication
  • hamburger menu style navigation
  • embedding a search component
  • embedding a liveboard component
  • embedding the full ThoughtSpot app

Rate this code

Thank you for rating this code!

Installation instructions

Sign up for Free Trial account

You will need a ThoughtSpot Free Trial account here.

Clone Github Repo

Clone the ThoughtSpot Quickstarts repo. $ git clone

Change directories to quickstarts/react-starter-app

Install dependencies

npm install

Configure the app

Each embedded component requires a unique identifier to tell the Visual Embed SDK which ThoughtSpot component to render. The best way to retrieve the specific id is via the Developer Playground. Depending on which component you are using (Search, Liveboard), the id may be called something slightly different. Refer to the code samples in this project to see the specific names, then, within the Playground, retrieve the required value. For example, when using a Search component, the Visual Embed SDK requires a dataSource id, which can be retrieved by changing the data source here

Run the app

npm start

Once the app is running, you can navigate to http://localhost:8000 to check it out. Try navigating to one of the subpages via the hamburger menu. The first time you access a page with an embedded component you will be prompted to log into your Free Trial account.

Get code