generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Consuming @iot-app-kit/react-components per instructions currently requires pulling in several other dependencies including sass, is-hotkey, react-hotkeys, and react-popper.
To Reproduce
Steps to reproduce the behavior:
Set up any react application with the following client component code:
import { initialize } from "@iot-app-kit/source-iotsitewise";
import { LineChart, WebglContext } from "@iot-app-kit/react-components";
import "@iot-app-kit/components/styles.css";
const { query } = initialize({
awsCredentials: {
accessKeyId: YOUR_ACCESS_KEY_ID,
secretAccessKey: YOUR_SECRET_ACCESS_KEY,
sessionToken: YOUR_TOKEN
},
awsRegion: "us-west-2",
});
export default function Client() {
return (
<>
<LineChart
queries={[
query.timeSeriesData({
assets: [
{
// Replace sitewse-asset-id with the ID of your AWS IoT SiteWise asset.
assetId: "sitewise-asset-id",
// Replace property-id with the ID of your AWS IoT SiteWise asset property.
properties: [
{ propertyId: "property-id" },
],
},
],
}),
]}
/>
<WebglContext />
</>
);
}
Expected behavior
This works with only prescribed dependencies - react-components and source-iotsitewise.
harunhasdal, TheEvilDev and dwil618
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working