This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import Subapp from './subapp/Root' | |
| class BigApp extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| <Subapp /> | |
| <Subapp /> | |
| <Subapp /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var callByName = (function(global) { | |
| return function(name, args, thisArg) { | |
| return global[name].call(thisArg, args); | |
| } | |
| })(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports.isKindOf = function(duck, obj) { | |
| var fn = function(obj) { | |
| return Object.getOwnPropertyNames(duck).every(function(name) { | |
| return obj.hasOwnProperty(name); | |
| }); | |
| }; | |
| return obj === undefined ? fn : fn(obj); | |
| }; |