Самые популярные вопросы и ответы для интервью и онлайн-тесты
Образовательная платформа для подготовки к интервью, онлайн-тестов, учебных материалов и живой практики

Развивайте навыки с целевыми маршрутами обучения, пробными тестами и контентом для подготовки к интервью.

WithoutBook объединяет вопросы для интервью по предметам, онлайн-практику, учебные материалы и сравнительные руководства в одном удобном учебном пространстве.

Подготовка к интервью

Svelte.js вопросы и ответы для интервью

Вопрос 16. How can you conditionally apply CSS classes in Svelte?

You can conditionally apply CSS classes in Svelte using the 'class:' directive. For example: {class: active ? 'active' : 'inactive'}

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 17. What is the purpose of the 'context' API in Svelte?

The 'context' API in Svelte allows components to communicate indirectly by sharing state with their descendants. It's useful for avoiding prop drilling.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 18. How can you handle form submissions in Svelte?

Form submissions in Svelte can be handled using the 'on:submit' directive. You can prevent the default form behavior and implement your custom logic in the associated function.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 19. What is the purpose of the 'use:' directive in Svelte?

The 'use:' directive in Svelte is used to apply actions to DOM elements. Actions are functions that can perform side effects, like animating or interacting with the DOM.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 20. Explain the difference between reactive declarations and statements in Svelte.

Reactive declarations in Svelte create reactive variables based on dependencies, while reactive statements directly execute code when dependencies change. Declarations use '$:' syntax, and statements use '{# ... }'.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Самое полезное по оценкам пользователей:

Авторские права © 2026, WithoutBook.