Files: 3582ba8ad59f6e36f60142e530d0794c1e02c095 / 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