Ułóż w kolejności · Kurs Vue.js · Moduł 2: Składnia szablonów
Składnia template ref
Ułóż fragmenty kodu template ref w kolejności, w jakiej zaczynają działać:
Elementy do ułożenia
- inputRef.value.focus()
- <input ref="inputRef" />
- const inputRef = ref(null)
Pokaż odpowiedź
Poprawna kolejność:
- const inputRef = ref(null)
- <input ref="inputRef" />
- inputRef.value.focus()