Files: 73b8cb0026f46f9832397193b25b38399404be17 / app / util / fetch-element.js
317 bytesRaw
1 | import React from 'react' |
2 | |
3 | export default function fetchElement (store) { |
4 | return function (Component, props) { |
5 | if (Component.fetchData) { |
6 | Component.fetchData( |
7 | store.getState, store.dispatch, |
8 | props.location, props.params |
9 | ) |
10 | } |
11 | return React.createElement(Component, props) |
12 | } |
13 | } |
14 |
Built with git-ssb-web