message: Removed legacy context from shared element
diff: -import { StateNavigator } from 'navigation';
  import * as React from 'react';
  import withStateNavigator from './withStateNavigator';
  import SharedElementContext from './SharedElementContext';
  @@ -7,20 +6,11 @@ import { SharedElementProps } from './Props';
  class SharedElement extends React.Component<SharedElementProps, any> {
  private ref: HTMLElement;
  private scene: number;
  - context: {
  - stateNavigator: StateNavigator,
  - }
  - constructor(props, context) {
  - super(props, context);
  - this.scene = this.getStateNavigator().stateContext.crumbs.length;
  + constructor(props) {
  + super(props);
  + this.scene = this.props.stateNavigator.stateContext.crumbs.length;
  this.register = this.register.bind(this);
  }
  - static contextTypes = {
  - stateNavigator: () => null,
  - }
  - private getStateNavigator(): StateNavigator {
  - return this.props.stateNavigator || this.context.stateNavigator;
  - }
  componentDidMount() {
  this.register();
  }
  @@ -32,14 +22,14 @@ class SharedElement extends React.Component<SharedElementProps, any> {
  this.props.unregisterSharedElement(this.scene, this.props.name);
  }
  register() {
  - var {crumbs, oldUrl} = this.getStateNavigator().stateContext;
  + var {crumbs, oldUrl} = this.props.stateNavigator.stateContext;
  if (this.scene === crumbs.length || (oldUrl && this.scene === oldUrl.split('crumb=').length - 1)) {
  - var {unshare, name, data} = this.props;
  + var {unshare, name, data, registerSharedElement, unregisterSharedElement} = this.props;
  if (!unshare) {
  if (this.ref)
  - this.props.registerSharedElement(this.scene, name, this.ref, data);
  + registerSharedElement(this.scene, name, this.ref, data);
  } else {
  - this.props.unregisterSharedElement(this.scene, name);
  + unregisterSharedElement(this.scene, name);
  }
  }
  }
  