How to embed Latitude views in your React app
LatitudeEmbed
component.
LatitudeEmbed
component and use it anywhere within your React app. To do that, you need to pass the URL of the view you want to embed.
LatitudeEmbed
component, you can control the parameters of the embedded view directly from your React app.
params
to the LatitudeEmbed
component.
changeEmbedParams
method provided by the package.
changeEmbedParams
method and passing the new parameters.
onParamsChanged
event.
runEmbedViewQuery
method and passing the name of the query.
triggerCustomEvent
method.
onCustomEvent
event available in the @latitude-data/embedding
package, which is included in every Latitude app.
<LatitudeEmbed />
component.
Experiment by modifying the field within YOUR REACT APP
and observe the changes in the Latitude app. Next, adjust the same field within the LATITUDE IFRAME
and watch how the React app responds. To execute all queries in the example, click the Run
button.
And lastly Pick your character
and see how Latitude app shows your Star Wars character. May the force be with you!