Getting started
Installation
How to install the react package in your project
1
Install Latitude for React
Install the @latitude-data/react
package in your project:
2
Import the styles
Import the styles used by Latitude components in your project’s root file:
index.tsx
3
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.
index.tsx
Using Latitude without components
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.
index.tsx