In 50ish lines of code, we’ll show off our new generic React hooks package, in a microscopic iModel.js app that animates a marker, displaying the live level of a tank in some hypothetical real world location, and these hooks will let us do it effortlessly, without gotchas. We’re talking 50ish-clear-cogent-lines-of-code effortlessly.
These fresh React hooks have all been locally-sourced across a variety of production applications, brought together to their new home, @bentley/react-hooks. Unlike @bentley/imodel-react-hooks, these hooks are 100% generic, for any React project, or any part of your UI that is pure React. …
So you want to add a marker to your app, but you’re really lazy. Like JavaScript generators lazy. And you don’t even want to know what a decorator is. Well that’s OK now. Probably not for long, but for now, sure. Lucky for you, there’s a package to cover those most lethargic urges.
Perhaps you’re not lazy and want to have child components elegantly override some feature symbology but its parents are already managing the FeatureOverrideProvider
to override something else, now you’ll need to lift some state or use some callbacks or something to glue that together… but no, this…
will fill this out later