UNPKG

351 BTypeScriptView Raw
1import { Component } from 'react';
2
3type StopProps = {
4 parent?: Component;
5};
6
7export default class Stop extends Component<StopProps, {}> {
8 props!: StopProps;
9 static displayName = 'Stop';
10
11 setNativeProps = () => {
12 const { parent } = this.props;
13 if (parent) {
14 parent.forceUpdate();
15 }
16 };
17
18 render() {
19 return null;
20 }
21}