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 |
What it means
Section titled “What it means”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).
How to fix
Section titled “How to fix”Pass a function and call the timer by its name: setTimeout(() => show(), 1000).