How to use the dotnetify/react-native.react function in dotnetify

To help you get started, we’ve selected a few dotnetify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dsuryd / dotNetify-react-native-demo / src / screens / AFIDetailsScreen.js View on Github external
constructor(props) {
    super(props);
    this.navigate = props.navigation.navigate;
    this.state = { MovieDetails: { Cast: '' } };

    const self = this;
    const { rank } = props.navigation.state.params;
    this.vm = dotnetify.react.connect('AFIDetailsVM', this, {
      vmArg: { Rank: rank },
      exceptionHandler: ex => ScreenTracker.goToLoginScreen(self.navigate, ex)
    });
  }
github dsuryd / dotNetify-react-native-demo / src / screens / LiveGaugeScreen.js View on Github external
connectLiveGauge = screen => {
    const self = this;
    if (screen == 'LiveGauge') {
      this.vm = dotnetify.react.connect('LiveGaugeVM', this, {
        exceptionHandler: ex => ScreenTracker.goToLoginScreen(self.navigate, ex)
      });
    }
    else if (this.vm) {
      this.vm.$destroy();
      this.vm = null;
    }
  };
github dsuryd / dotNetify-react-native-demo / src / ScreenTracker.js View on Github external
goToLoginScreen = (navigate, exception) => {
    this.reset();
    dotnetify.react.getViewModels().forEach(vm => vm.$destroy());
    navigate('Login', exception);
  };
}
github dsuryd / dotNetify-react-native-demo / src / screens / AFITop100Screen.js View on Github external
token =>
        (this.vm = dotnetify.react.connect('AFITop100ListVM', this, {
          vmArg: { RecordsPerPage: 20 },
          setState: this.updateMovies,
          headers: { Authorization: 'Bearer ' + token },
          exceptionHandler: ex => ScreenTracker.goToLoginScreen(self.navigate, ex)
        }))
    );