ankitects / ankitects/anki

Deprecated createEventDispatcher usage in Svelte components

Open
#4,408 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.5k
Forks
3.2k
Avg merge
2d 8h
Merged PRs (30d)
72

Description

The codebase currently uses `createEventDispatcher` [(example usage here)](https://github.com/ankitects/anki/blob/main/ts/routes/deck-options/SaveButton.svelte#L27), which is deprecated in Svelte 5.

The [Svelte 5 migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events) recommends using callback props instead of dispatching events. It may be worth refactoring affected components to follow the new pattern and maintain forward compatibility with Svelte 5.

Contributor guide

Open the contributing guide

Research direction

Start with ts/routes/deck-options/SaveButton.svelte and read the Svelte 5 migration guide section on component events. Search the Svelte components for createEventDispatcher, identify the affected usages, and determine how callback props should replace them. Done means the affected components no longer use the deprecated API and their existing event behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.