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

Add didBuild lifecycle #30

Closed
2 tasks
rrousselGit opened this issue Jan 6, 2019 · 1 comment
Closed
2 tasks

Add didBuild lifecycle #30

rrousselGit opened this issue Jan 6, 2019 · 1 comment
Assignees

Comments

@rrousselGit
Copy link
Owner

rrousselGit commented Jan 6, 2019

Some use-case such as mobxjs/mobx.dart#14 wants to trigger some custom logic right after the build method ended.

We can create a custom life-cycle on hooks to support this use-case:

class _SomeHookState extends HookState<T, Hook<T>> {
  @override 
  void didBuild() {
    // TODO: do something after `HookWidget.build` but because the children build.
  }
}
  • useAsyncEffect
  • useErrorBoundary
@rrousselGit rrousselGit self-assigned this Jan 6, 2019
@rrousselGit rrousselGit mentioned this issue Jan 7, 2019
@rrousselGit
Copy link
Owner Author

A potential use case to this life-cycle:

Pusing routes or marking an Overlay as needing build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant