Skip to content

Instantly share code, notes, and snippets.

@daybrush
Last active July 15, 2019 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daybrush/ed5a4bffd159bfe90c373d87e74631ec to your computer and use it in GitHub Desktop.
Save daybrush/ed5a4bffd159bfe90c373d87e74631ec to your computer and use it in GitHub Desktop.
import ChildrenDiffer, { ChildrenDiffResult } from "@egjs/react-children-differ";
class Flicking {
public render() {
return (
<ChildrenDiffer onUpdate={this.onUpdate}>
{this.renderPanels()}
</ChildrenDiffer>
);
}
public onUpdate = (result: ChildrenDiffResult<HTMLElement>) => {
this.flicking.sync(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment