How to install the react package in your project
Install Latitude for React
Install the @latitude-data/react
package in your project:
Import the styles
Import the styles used by Latitude components in your project’s root file:
Wrap your app with the LatitudeProvider
Wrap your main component with the LatitudeProvider
to enable the use of Latitude components.
In the LatitudeProvider
, you must set the apiConfig
to configure the API connection with the Latitude server.
If you are planning to use the package only for the API features without the built-in components, you can skip the import of the styles.css
, and add a theme={false}
prop to the LatitudeProvider
.
This way they won’t be included in your bundle.