question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ADDED POSSIBILITY TO INIT VIEW AFTER RELOADING

See original GitHub issue

Use IReloadable interface for achieving it

    public partial class MainPage : ContentPage, IReloadable
    {
        public void OnLoaded()
        {
            Btn.Clicked += Handle_Clicked;
        }

        void Handle_Clicked(object sender, System.EventArgs e)
        {
            Btn.Text = (int.Parse(Btn.Text) + 1).ToString();
        }

    }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
MagicAndre1981commented, Mar 5, 2019

ok, it works now and I have no idea why it fails. Also OnLoaded() is called on XAML change in UWP. I use public async void OnLoaded() and it works so far. I hope it doesn’t produce hangs in future.

0reactions
MagicAndre1981commented, Mar 5, 2019

In past this caused deadlocks for me, so I try to avoid it now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 5 - How to reload a component after it is initialized
Ok the trick is that if the model is updated, the component need not be reloaded. The view is automatically updated.
Read more >
Component Lifecycle
A component instance has a lifecycle that starts when Angular instantiates the component class and renders the component view along with its child...
Read more >
Angular Lifecycle Hooks: ngOnChanges, ngOnInit, and more
ngAfterViewInit fires once after the view DOM finishes initializing. The view always loads right after the content. ngAfterViewInit waits on @ ...
Read more >
Angular: Reload/Refresh a Component or Entire ...
An Angular tutorial on how to reload/refresh a single component or the entire application and reuse the logic across multiple components.
Read more >
Loading Components Dynamically in an Angular App
A tutorial that shows how to create an Angular app with dynamic component loading.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found