Hi, I have a question about how to extend/add parameter when declaring need on component. Here's the snippet included in the starterkit.. PostDetailPage.need = [params => { return fetchPost(params.cuid); }]; Is it only receiving params and store? how do i get props for the component itself? let say, i want to pass query string from url and pass to array of actions that will be sent to need..
Thank you
Somasundaram Ayyappan
You need to modify
fetchData.jsutility functionimport { sequence } from './promiseUtils'; export function fetchComponentData(store, components, params) { const needs = components.reduce((prev, current) => { return (current.need || []) .concat((current.WrappedComponent && (current.WrappedComponent.need !== current.need) ? current.WrappedComponent.need : []) || []) .concat(prev); }, []); return sequence(needs, need => store.dispatch(need(params, store.getState()))); // ^ // Pass the extra parameters here. }