UNPKG

534 BJavaScriptView Raw
1/**
2 * Baobab-React Decorators
3 * ========================
4 *
5 * ES7 decorators sugar for higher order components.
6 */
7'use strict';
8
9Object.defineProperty(exports, '__esModule', {
10 value: true
11});
12exports.root = root;
13exports.branch = branch;
14
15var _higherOrderJs = require('./higher-order.js');
16
17function root(tree) {
18 return function (Component) {
19 return (0, _higherOrderJs.root)(Component, tree);
20 };
21}
22
23function branch(specs) {
24 return function (Component) {
25 return (0, _higherOrderJs.branch)(Component, specs);
26 };
27}
\No newline at end of file