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

add(examples): react widgets get started #8889

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisgervang
Copy link
Collaborator

Supports #8877

Change List

  • Add a react get-started example for widgets

Signed-off-by: Chris Gervang <chris@gervang.com>
@coveralls
Copy link

Coverage Status

coverage: 89.821%. remained the same
when pulling a29515c on chr/react-widgets-get-started
into b5a6313 on master.

new FullscreenWidget({style: widgetTheme})
]}
>
<GeoJsonLayer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated: should we move get-started to TypeScript? Maybe pure-js can be reserved for JS examples, but react projects are more likely to be using bundlers/plugins/dev frameworks that already support TS.

It's known that JSX layers do not work with TS, though

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the fiber renderer works with TSX? visgl/deck.gl-community#35

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a value in using JSX layers when the stars of the show, the Widgets, are not expressed as JSX?

import '@deck.gl/widgets/stylesheet.css';

/* global window */
const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I wasn't aware that there was a standardized way to query for dark mode. Seems like something that could be built into the widget theming system as a default? PreferredTheme or something like that? Though maybe it is better for exposition to show it here.

new FullscreenWidget({style: widgetTheme})
]}
>
<GeoJsonLayer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a value in using JSX layers when the stars of the show, the Widgets, are not expressed as JSX?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants