How to use the umi/withRouter function in umi

To help you get started, we’ve selected a few umi 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 umijs / umi / packages / umi-build-dev / src / plugins / 404 / NotFound.js View on Github external
then this page will automatically refresh to show the new page component you created.
        <p></p>
        <h2>Your Routes</h2>
        {do {
          if (this.state.loading) {
            <div>Loading routes...</div>;
          } else {
            this.renderRoutes(this.state.routes);
          }
        }}
      
    );
  }
}

export default withRouter(NotFound);
github dvajs / dva / packages / dva-example-user-dashboard / src / layouts / Header.js View on Github external
Users
      
      
        Home
      
      
        404
      
      
        <a href="https://github.com/dvajs/dva">dva</a>
      
    
  );
}

export default withRouter(Header);
github DFocusGroup / generator-umi / generators / app / templates / src / layouts / AuthRequiredLayout / index.js View on Github external
{children}
        
      
    
  )
}

AuthRequiredLayout.propTypes = {
  children: PropTypes.any
}

export default withRouter(AuthRequiredLayout)
github heifade / umi-simple-demo / src / pages / company1 / layouts / frame / index.tsx View on Github external
<div>这是TitleBar</div>
      <div>
        <div>这是菜单</div>
        <div>
          
            
              {children}
            
          
        </div>
      </div>
    
  );
};

export default withRouter(Company);
github hyperledger / cello / src / dashboard / src / pages / Operator / Agent / newAgent.js View on Github external
loading={action === 'create' ? submitting : updating}
                type="primary"
                htmlType="submit"
                style={{ marginLeft: 8 }}
              &gt;
                
              
            
          
        
      
    );
  }
}

export default withRouter(CreateAgent);