Files: d257f1cb78aa333ab6399429df9d754ce4f561f5 / app / util / fetch-element.js
293 bytesRaw
1 | const React = require('react') |
2 | |
3 | module.exports = fetchElement |
4 | |
5 | function fetchElement (Component, props) { |
6 | if (Component.fetchData) { |
7 | Component.fetchData( |
8 | store.getState, store.dispatch, |
9 | props.location, props.params |
10 | ) |
11 | } |
12 | return React.createElement(Component, props) |
13 | } |
14 | |
15 |
Built with git-ssb-web