Skip to content

useDevWarning

@astryxdesign/core v0.7.1 · useDevWarning

Parameters ​

NameTypeDefaultDescription
componentstring—Component or hook name, used as the message prefix. Required.
messagestring—What went wrong and how to fix it. Required.
conditionMaybeRefOrGetter<boolean>trueWhether to warn. A plain boolean, a ref, or a getter all work. The first time it is true during a mount the warning fires once, and toggling it again in the same mount stays quiet.

Returns ​

NameTypeDescription
—voidNothing is returned. The watcher stops when the component or effect scope is disposed, and in a production build the function does nothing at all.