Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Event Listener Earlier #696

Closed
FlorianRappl opened this issue May 22, 2024 · 0 comments
Closed

Install Event Listener Earlier #696

FlorianRappl opened this issue May 22, 2024 · 0 comments
Labels
blazor Concerns the Blazor integration piral-blazor. enhancement New feature or request
Milestone

Comments

@FlorianRappl
Copy link
Contributor

New Feature Proposal

For more information, see the CONTRIBUTING guide.

Description

Right now the event listeners for piral-blazor are installed when a component is mounted. This might be too late, esp. in non-lazy loaded scenarios (e.g., a global Blazor-Pilet installs an interceptor and tries to get an access token).

Background

Right now an application might either be stuck (preview of Piral.Blazor v16) or wait for the 20s timeout (Piral.Blazor v16) when it calls a pilet API function from a global Blazor-Pilet during startup, if createBlazorApi({ lazy: false }) is used.

Discussion

One reason to defer the event listener attaching to the mounting is that only then we have the pilet API of the corresponding component. Maybe having one global set of event listeners (maybe not for all events, but certainly for the pilet API access) could make sense. Any other ideas?

@FlorianRappl FlorianRappl added enhancement New feature or request in-review The item is currently being reviewed. blazor Concerns the Blazor integration piral-blazor. labels May 22, 2024
@FlorianRappl FlorianRappl added this to the 1.6.0 milestone May 22, 2024
@FlorianRappl FlorianRappl added in-implementation The item is currently being implemented. and removed in-review The item is currently being reviewed. labels Jun 6, 2024
@FlorianRappl FlorianRappl added in-testing The item is already out in preview and can be tested. and removed in-implementation The item is currently being implemented. in-testing The item is already out in preview and can be tested. labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blazor Concerns the Blazor integration piral-blazor. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant