Hello! I just went through the trial demo for embe...
# gd-beginners
m
Hello! I just went through the trial demo for embedding into a web application with tiger. There seems to be an error in the documentation at step 6 in Build Web Data Applications. It’s importing ‘VisualizationView’ and ‘Visualizations’ whereas it should be ‘InsightView’ and ‘Insights’. I’m guessing the import statements still reference old names. Also, I’m getting the attached error after the embedding script in
src/routes/Home.tsx
compiles successfully. MD is importing correctly from my trial account. Any hints?
i
Hi Marcel! Please, are you working with GoodData.CN 2.2 or with GoodData Cloud? Documentation for these two products is slightly different: https://www.gooddata.com/developers/cloud-native/doc/2.2/introduction/ https://www.gooddata.com/developers/cloud-native/doc/cloud/introduction/
m
Hi Ivana, This is with Good Data Cloud.
@Ivana Gasparekova Hi Ivana, would you have an update on my issue above?
j
Hi Marcel, you are right, the second line in order to import Insight properly should be:
import { InsightView } from "@gooddata/sdk-ui-ext";
InsightView docs reference, I will try to push the change in docs not to be confusing. On the fifth line, you can either do this:
import * as Md from "../md/full";
To use it later as:
<InsightView insight={Md.Insights.nameOfYourInsight} />
Or you can use it as you are suggesting:
import { Insights } from "../md/full";
To be used like this:
<InsightView insight={Insights.nameOfYourInsight} />
However I am a bit concerned that this might still not work after changing. Could you please open a web browser console and see what kind or error you are getting (if any)?
🙌 1