###报错Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
###header.js 的代码
`
import React from ‘react’;
import { connect } from ‘react-redux’;
import { CSSTransition } from ‘react-transition-group’
import {
HeaderWrapper,
Logo,
Nav,
NavItem,
SearchWrapper,
NavSearch,
Addition,
Button
} from ‘./style’;
const Header = props => {
const { focused, handleInputFocus, handleInputBlur} = props;
return (
const mapStateToProps = state => {
return {
focused: state.focused
}
}
const mapDispatchToProps = dispatch => {
return {
handleInputFocus() {
const action = {
type: ‘search_focus’
}
dispatch(action)
},
handleInputBlur(){
const action = {
type: ‘search_focus’
}
dispatch(action)
}
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Header);
`