Skip to content

Instantly share code, notes, and snippets.

@dbismut
Last active April 9, 2018 07:54
Show Gist options
  • Save dbismut/38dba0f2076b1981c945a4f1a86eb941 to your computer and use it in GitHub Desktop.
Save dbismut/38dba0f2076b1981c945a4f1a86eb941 to your computer and use it in GitHub Desktop.
Part 2 - Setting onEnter function - referencing the preview node
onEnter = () => {
const { post } = this.props.route.data;
this.preview = document.querySelector(`.preview[data-id="${post.id}"]`);
this.pageList = document.querySelector('.page-list');
this.pageListStyler = styler(this.pageList);
this.from = this.getPreviewStyleAndPosition();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment