pls i wanted to use placeInfo,reviews,detailsInfo,news coming from data file. instead of putting value='hello' [i doubt if i can use it direct like this value={placeInfo,reviews,detailsInfo,news} which is giving me error or i should put it in var
CodePudding user response:
Wrap the value in an object like this value={{placeInfo, reviews, detailsInfo, news}}
or create the object on a separate line like this:
const value = {
placeInfo,
reviews,
detailsInfo,
news
};
Then pass it as value={value}