Answer the question
In order to leave comments, you need to log in
Why can't I connect to the storage?
I started learning TypeScript, I'm trying to connect to the store from the component, but for some reason props do not come from the store. Eze hasn't typed anything yet, just trying to get data. What could be the problem?
import * as React from 'react'
import * as classnames from 'classnames'
import * as css from './Home.css'
import {getStore} from '../store/index'
import {getProjects} from "../store/actions/projects";
import { connect } from "react-redux";
export const Home = ({list}) => {
console.log(list)
return <div className={classnames('test', css.home)}>
<ul>
TEST
</ul>
</div>
}
const mapStateToProps = (state) => ({
list: state.list
});
export default connect(
mapStateToProps,
null
)(Home);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question