-
Notifications
You must be signed in to change notification settings - Fork 152
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
Introduce lifecycle hooks #95
Conversation
@bantic this is good to go. |
@@ -319,6 +332,8 @@ class Editor { | |||
showForTag: 'a' | |||
})); | |||
|
|||
// Stub out a post editing session for initial render | |||
this.run(() => {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the empty run
there? It's not clear to me from that comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will elaborate, poor wording there.
* didUpdatePost, which gets passed the postEditor * willRender, before render after post changes are complete * didRender, after render when DOM and post are in sync
🎉 |
@@ -319,6 +332,9 @@ class Editor { | |||
showForTag: 'a' | |||
})); | |||
|
|||
// A call to `run` will trigger the didUpdatePostCallbacks hooks with a | |||
// postEditor. | |||
this.run(() => {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be this.runCallbacks()
or something? This looks like the sort of no-op-y code that will get deleted by someone in the future.
TODO: