visgl / visgl/react-map-gl

[Bug] Failed to set an indexed property on 'CSSStyleDeclaration': Index property setter is not supported when showing/changing/map

Open
#2,473 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
8.5k
Forks
1.4k
Avg merge
5d 17h
Merged PRs (30d)
3

Description

Description

Possibly a "you're holding it wrong" issue, but reporting in case it's something that can be easily fixed at this level.

When I pass a style parameter with a list to my Map component, a react change that adds the component triggers an error akin to the one described in https://stackoverflow.com/a/66053268 . I think this is due to https://github.com/visgl/react-map-gl/blob/fdf57d04dbfb8524fb192275f9d511997fa80998/src/components/map.tsx#L135

Expected Behavior

No response

Steps to Reproduce

https://codesandbox.io/p/sandbox/weathered-wave-sf7pp6

Environment
  • Framework version: react-map-gl@7.1.8
  • Map library:
  • Browser:
  • OS:
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Map component code at src/components/map.tsx around line 135, then reproduce the error using the linked CodeSandbox with a style parameter containing a list. Compare the failing behavior with the reported CSSStyleDeclaration error and verify that the Map component no longer triggers it when the change is applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.