Skip to content

Could not find "store" in either the context or props & @connect() (redux connected) component  #358

@dlim-dlim

Description

@dlim-dlim

Hi,

Just wanted to see if there is a current solution to render "store" in an @connect() (redux connected) component in the styleguide?

When I view the styleguide, I'm seeing this error:
Invariant Violation: Could not find "store" in either the context or props of "Connect(Footer)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Footer)".

Here's the export statement in Footer.jsx:

export default connect(mapStateToProps)(Footer);

In the Wrapper component I tried adding a Provider wrapper without any luck:

render() {
    return (
      <Provider store={getStore()}> 
	      <IntlProvider locale='en'>
	        {this.props.children}
	      </IntlProvider>
      </Provider> 
    );
  }

In styleguide.config.js I'm referencing:
resolver: docgen.resolver.findAllComponentDefinitions

I saw this thread but didn't mention "store" #143

Looking to see if anyone has a workable recommendation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions