question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HexagonLayer hexagons' z-indexes are wrong / reversed after swapping out React for Inferno

See original GitHub issue

I wouldn’t normally expect a library to ‘just work’ after replacing something as fundamental as React, but the bug I hit actually seems orthogonal to the virtual DOM tool chosen.

Repro Steps

  1. Install all required packages for deck.gl with react-mapbox-gl
  2. Add inferno and its respective dependencies, and alias them to use inferno-compat via webpack
  3. Render!

Observed

screen shot 2017-09-12 at 4 13 52 pm

Expected

screen shot 2017-09-12 at 4 16 39 pm

Here’s the code that creates the layer:

new HexagonLayer({
                id: 'data-layer',
                data,
                radius: 200,
                extruded: true,
                elevationRange: [0, 1000],
                opacity: 0.8,
                elevationScale: 4,
                coverage: 1,
            })

I did notice something odd, which was that extruded had to be explicitly set despite the docs claiming it defaults to true for this layer type. I wonder if there’s a difference in how default props are assessed?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
ibgreencommented, Sep 13, 2017

@TedDriggs - another thing that has failed is enabling of depth testing (z buffer). Either you might not have copied that code from the original example, or Inferno fails to call onWebGLInitialized.

Hard to say for sure, but does indeed appear like React property values fail to be set. Most of deck.gl’s React integration is in the linked source file so putting some breakpoints in there should help narrow it down.

If you are willing to open a PR with your example (maybe in examples/integrations/inferno we might be able to take a quick look as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HexagonLayer hexagons' z-indexes are wrong / reversed ...
I wouldn't normally expect a library to 'just work' after replacing something as fundamental as React, but the bug I hit actually seems ......
Read more >
Reloading DeckGL HexagonLayer when data array ...
My main problem is, that I can't figure out how to refresh the data representing layer after filtering the data array. I saw...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found