Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] reduce friction when consuming react-components as a dependency #1810

Open
boweihan opened this issue Aug 18, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@boweihan
Copy link
Contributor

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.

@boweihan boweihan added the bug Something isn't working label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant