lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Audit and consolidate usage of `null` and `undefined` in the engine

Open jmsjtu opened this issue 5 months ago • 1 comments

In several parts of @lwc/engine-core we have inconsistent usage of whether a missing vnode or its value is undefined or null.

We should audit all usages and consolidate into using either undefined or null.

jmsjtu avatar Mar 27 '24 19:03 jmsjtu

I think typically undefined is used for missing primitives (numbers, strings, etc.) whereas null is used for missing objects. I dunno if this has an impact on JS engine performance.

nolanlawson avatar Apr 18 '24 15:04 nolanlawson