Ребят, всем привет, помогите пожалуйста исправить ошибку. TypeError: Cannot read property 'postStatistics' of undefined. Код:
let initialState{
postStatistics: []
}
const profileReduser = (state = initialState, action) => {}
let reducers = combineReducers({
profilePage: profileReduser,
})
<Route path="/profile" render={() => <Profile store={
props.store}/>}/>
<Posts profilePage={props.store.profilePage}/>
let arrayPosts =
props.profilePage.postStatistics.map( p => <Post message={p.message} likesCount={p.likesCount} repostCount={p.repostCount} img={p.img} />)
Или вот ссылка на гит хаб
https://github.com/goringich/1/tree/main/src/components