How to use the @uirouter/react.UIView.prototype function in @uirouter/react

To help you get started, we’ve selected a few @uirouter/react 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 ui-router / react-hybrid / src / react / UIViewMonkeyPatch.tsx View on Github external
*
 * When a @uirouter/react `` is rendered (from react code),
 * it renders first to an AngularJS `` component,
 * inside the `ui-view` is an AngularJS ``,
 * which finally renders a real @uirouter/react ``:
 *
 * 
 *   
 *     
 *       
 *     
 *   
 * 
 */

UIView.prototype.render = function() {
  if (this.props.wrap === false) {
    const id = `${this.$id}/${this.props['name']}`;
    debugLog('react', 'UIViewMonkeyPatch', id, '.render()', 'realRender.apply(this, arguments)');
    return realRender.apply(this, arguments);
  }

  return ;
};
github ui-router / react-hybrid / src / react / UIViewMonkeyPatch.tsx View on Github external
import * as React from 'react';
import { UIView } from '@uirouter/react';
import { debugLog } from '../debug';
import { PortalView } from './PortalView';

const realRender = UIView.prototype.render;

/**
 * Monkey patches the @uirouter/react UIView such that:
 *
 * When a @uirouter/react `` is rendered (from react code),
 * it renders first to an AngularJS `` component,
 * inside the `ui-view` is an AngularJS ``,
 * which finally renders a real @uirouter/react ``:
 *
 * 
 *   
 *     
 *       
 *     
 *   
 * 

@uirouter/react

State based routing for React

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Similar packages