Misc.

Best Practices

Lodash _.get() vs && chains

With a nested object like const foo = { a: { b: { c: 'bar' } } }

…instead of accessing the c property with something like: ❌ if (a && a.b && a.b.c) { ... }

use Lodash, as in: ✔️ .get(foo, 'a.b.c', 'default')

Lodash reference

Last modified November 20, 2020: Update grafana guilde (3f24643)