PrismLibrary / PrismLibrary/Prism

[Enhancement] Add an async initialization to Regions

Open
#3,244 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
6.8k
Forks
1.6k
Avg merge
2d 1h
Merged PRs (30d)
1

Description

Summary

The current API has an IInitializeAsync which provides a convenient way to run async code during page initialization. However, there does not exists a similar implementation pattern if async initialization is needed for a region ViewModel

API Changes

Could possibly add an IRegionAwareAsync interface which implements:

IRegionAwareAsync
{
    Task OnNavigatedToAsync(NavigationContext navigationContext)
}

This would need a supporting call from the MvvmHelpers class

Intended Use Case

Provide a clean approach to implementing async code during initialization of a region view model

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing IInitializeAsync pattern, the region navigation lifecycle, and the MvvmHelpers class mentioned in the issue. Trace how synchronous region awareness is invoked and review related tests if present. Done means an agreed async region-initialization API is integrated into that lifecycle with coverage for the intended ViewModel use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.