Question: I am new to redux. I typed up a simple piece of code that just dispatches the name "Mike" 

However when i click on the `buttonClick()` function I created.. nothing gets dispatched also I am not sure how I can show the dispatched value "Mike" where it says "Hi my name is ... " 

Below is my code. Any help would be really appreciated 

```
import React from 'react';
import './App.css';
import {changeName} from './reducers.js'
import {createStore} from 'redux';
import {changeNameAction} from './actions'
import {connect} from 'react-redux';

var store = createStore(changeName);

const App = ({buttonClick=f=>f }) => {
      return(
      <div className="App">
        <div> Hi my name is {}  </div>
        <div><button onClick={()=> buttonClick("Mike")}>Change name</button></div>
      </div>
    )
};

const mapStateProps = (state) => {
    return {
        name: state.name
    }
}

const mapDispatchToProps = dispatch => {
    return {
        buttonClick(name){
            dispatch(changeNameAction(name))
        }
    }
}

const Container = connect(mapStateProps,mapDispatchToProps)(App);
export default Container;

```

Answer: 
I can't test your code right now, but you can try with this:

```js
// The connected props are part of the arguments
const App = ({ buttonClick = () => {}, name = '' }) => {
    return(
      <div className="App">
        {/* This way you can render the name prop */}
        <div> Hi my name is {name}</div>
        {/* Execute the function instead of returnning it */}
        <div><button onClick={() => { buttonClick("Mike"); }}>Change name</button></div>
      </div>
    )
};

const mapStateProps = (state) => {
    return {
        name: state.name
    }
}

const mapDispatchToProps = dispatch => {
    return {
        // Key value pair
        buttonClick: (name) => {
            dispatch(changeNameAction(name))
        }
    }
}

```

hope it helps
Sorry but you are missing too much redux concepts, check [the redux doc](https://redux.js.org/api/api-reference) please, this code should work:

```
import React from "react";
import { createStore } from "redux";
import { connect, Provider } from "react-redux";

const CHANGE_NAME = "CHANGE_NAME";
const changeNameAction = name => ({
  type: CHANGE_NAME,
  payload: name
});

const initialState = { name: "Taym" };
const changeName = (state = initialState, action) => {
  const { type, payload } = action;
  switch (type) {
    case CHANGE_NAME:
      return Object.assign({}, state, { name: payload });
    default:
      return state;
  }
};

const store = createStore(changeName);

const App = ({ buttonClick }) => {
  return (
    <Provider store={store}>
      <div className="App">
        <NameComponent />
      </div>
    </Provider>
  );
};

export default App;

const ConnectedNameComponent = ({ buttonClick, name }) => {
  return (
    <>
      <div> Hi my name is {name} </div>
      <div>
        <button onClick={() => buttonClick("Mike")}>Change name</button>
      </div>
    </>
  );
};
const mapStateProps = state => {
  return {
    name: state.name
  };
};

const mapDispatchToProps = dispatch => {
  return {
    buttonClick(name) {
      dispatch(changeNameAction(name));
    }
  };
};

const NameComponent = connect(
  mapStateProps,
  mapDispatchToProps
)(ConnectedNameComponent);

```