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

@deck.gl/widgets v8.10.0-alpha.4 use React.createElement instead of the preact jsxFactory h #8182

Closed
1 of 7 tasks
amarant opened this issue Oct 7, 2023 · 6 comments
Closed
1 of 7 tasks
Labels

Comments

@amarant
Copy link

amarant commented Oct 7, 2023

Description

Hi,
I was trying the @deck.gl/widgets v8.10.0-alpha.4 and it crashes because the translation from JSX to JS use React.createElement instead of the preact version h. I don't know why it didn't compile with it because the tsconfig seems to indicate the preact jsxFactory.

notify @chrisgervang who made the PR #8024

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS

Expected Behavior

No response

Steps to Reproduce

create a simple deck map using :

<DeckGL  widgets={[new FullscreenWidget({ id: 'test' })]} />

Environment

  • Framework version: v8.10.0-alpha.4
  • Browser: Chrome
  • OS:

Logs

deck: React is not defined undefined
@amarant amarant added the bug label Oct 7, 2023
@chrisgervang
Copy link
Collaborator

How do you install deck.gl in your environment? I'm not expecting our npm bundles to include JSX. Are you building from source?

@amarant
Copy link
Author

amarant commented Oct 8, 2023

I use the npm bundle, and the esm or es5 distributions don't use jsx, but it uses React.createElement instead of the preact function h, just look at Npm in @deck.gl/widgets/dist/esm/fullscreen-widget.js .

Screenshot_20231008-110034

@chrisgervang
Copy link
Collaborator

Just published 8.10.0-alpha.5 with a fix. Please give it a try.
Screen Shot 2023-10-17 at 4 08 36 PM

@amarant
Copy link
Author

amarant commented Oct 18, 2023

Thanks, this part works now, but there is an error in the stylesheet.

@chrisgervang
Copy link
Collaborator

Released 8.10.0-alpha.6 with that fixed.

@amarant
Copy link
Author

amarant commented Oct 23, 2023

This is all fixed now, thanks.

@amarant amarant closed this as completed Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants