noprop top-level constant

_NoProp const noprop

By default, all uninitialised variables are automatically passed as props (i.e constructor arguments) for the component during compilation.

This annotation object here does the opposite of prop - this object tells the compiler that the following variable is not intended to be a prop, and should not be included as a constructor argument.

This can be helpful, usually when the user plans for the variable to be initialised later on in the code.

Implementation

const noprop = _NoProp();