deckgl ยท console.warn
bindDeck: options.deck has no setProps(); pa...
Printed by deckgl, prefixed [lattice], since 1.74.0.
Warnings reference › deckgl:deck
- Identifier
deckgl:deck- Raised by
- deckgl
- Since
- 1.74.0
What happened
bindDeck hands the layers it builds to deck through deck.setProps({ layers }). The object passed as options.deck has no setProps, so it is not a deck.gl Deck (a common slip is passing the React DeckGL element or its ref rather than its deck instance). Nothing was bound: no listener, no layers, no filter.
The fix
Pass the Deck instance itself - new deck.Deck({ ... }), or ref.current.deck from a React DeckGL.
The smallest fix
bindDeck(grid, { deck: new deck.Deck({ parent, initialViewState, controller: true }), layers, position: { lon: 'lon', lat: 'lat' } });
Reference
Covered in full at the API reference.