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 onAfterRender #12

merged 4 commits into from Jun 26, 2017


None yet
2 participants
Copy link

sugarshin commented Jun 26, 2017

ref: #11

Flave and others added some commits Jun 22, 2017

Moved onSuccess call after render call
In order to get the dimensions (e.g. clientHeight, clientWidth) of the embed it needs to be rendered to the screen. This is why the onSuccess call is better made after the internal state update that causes the rerender.
Alternatively there could be an additional callback such as `onRender`. But since I didn’t see any particular advantage of placing the onSuccess call before the render, it is easier to just move it to the end. Hope this makes sense :)

@sugarshin sugarshin merged commit 679a764 into master Jun 26, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!

@sugarshin sugarshin deleted the pr/11 branch Jun 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment