A
A
Alexander Ivanov2021-01-22 17:42:55
typescript
Alexander Ivanov, 2021-01-22 17:42:55

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

1 answer(s)
I
iDrugov, 2017-06-08
@lemonlimelike

Because in rare cases such things work only on the adjacent (right element). Otherwise, if you move the mouse over .img_volume, then just change its parameters. Or use js to change the style of other elements.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question