Getting Started
Setting up the x-bees-connect Client is a straightforward process. Follow the steps below to integrate the SDK into your project.
Installation
To incorporate the @wildix/xbees-connect-react library into your React project, use the following command in your project directory:
yarn add @wildix/xbees-connect-react
or
npm install @wildix/xbees-connect-react
This installs the x-bees-connect-react package and its dependencies.
Usage
Once installed, you can import the components and hooks from the library into your React application. Here's an example of how to use the x-bees-connect-react components:
import { ThemeProvider, Button, TextField, useThemeEffect, useViewPortEffect } from '@wildix/xbees-connect-react';
const App = () => {
const theme = useThemeEffect();
useViewPortEffect();
return (
<ThemeProvider theme={theme}>
<CssBaseline />
<div>
<Button variant="contained" color="primary">
Click me
</Button>
<TextField label="Enter text" />
</div>
</ThemeProvider>
);
};
This example demonstrates the usage of the x-bees theme provider, a button, and a text field component.