System.js 235 B

1234567891011121314151617
  1. import React from 'react';
  2. export default class BaseSystem{
  3. constructor(){
  4. this.__update = null;
  5. }
  6. onUpdate(fn){
  7. this.__update = fn;
  8. return this;
  9. }
  10. forceUpdate(props){
  11. return this.__update && this.__update(props);
  12. }
  13. }