Pular para o conteúdo

UNSAFE_STRING_TIMER: Timer given a string

Este conteúdo não está disponível em sua língua ainda.

Severity Fault Stage
error customer (the source package) build output

The component passes a string to setTimeout or setInterval, which the browser compiles as code like eval, or calls a timer through an alias or as a value, where the build cannot see its first argument (rule string-timer).

Pass a function and call the timer by its name: setTimeout(() => show(), 1000).