How to use next-redux-wrapper - 10 common examples

To help you get started, we’ve selected a few next-redux-wrapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github resource-watch / resource-watch / pages / admin / partners / new.js View on Github external
);
}

PartnerNew.propTypes = {
  // Store
  user: PropTypes.object.isRequired
};

const mapStateToProps = state => ({
  user: state.user
});

export default withRedux(initStore, mapStateToProps, null)(PartnerNew);
github ApiTreeCZ / alda / pages / _app.tsx View on Github external
const {Component, store, pageProps, apolloClient} = this.props;
        return (
            
                
                    
                        {/* I can't use material-ui Layout (PageContainer) in _app.js */}
                        {/* FIXME: https://github.com/zeit/next.js/pull/4288 */}
                        
                    
                
            
        );
    }
}

export default withRedux(createStore)(
    compose(
        withApollo,
        withIntl,
        withMaterialUi,
    )(AldaApp),
);
github pepelatz / pepelatz-next-client / pages / _app.js View on Github external
import React, { Fragment } from 'react';
import { Provider } from 'react-redux';
import App, { Container } from 'next/app';
import { ApolloProvider } from 'react-apollo';

import withRedux from 'next-redux-wrapper';
import initStore from '../libs/store';
import withApollo from '../libs/withApollo';
import './_app.scss';

import Header from '../components/Header';
import Footer from '../components/Footer';
import Sidebar from '../components/Sidebar';

export default withApollo(
  withRedux(initStore)(
    class MyApp extends App {
      static async getInitialProps({ Component, ctx }) {
        return {
          pageProps: Component.getInitialProps
            ? await Component.getInitialProps(ctx)
            : {}
        };
      }

      render() {
        const { Component, pageProps, store, apolloClient } = this.props;
        return (
github merixstudio / React-Redux-Nextjs / pages / _app.js View on Github external
<div style="{{">
          
            <a>Homepage</a>
          
          
        </div>
      
    )
  }
}

export default withRedux(initsStore)(MyApp);
github resource-watch / resource-watch / pages / app / JoinCommunity.js View on Github external
JoinCommunity.propTypes = {
  data: React.PropTypes.object,
  getStaticData: React.PropTypes.func
};

const mapStateToProps = state => ({
  data: state.staticPages.joinCommunity
});

const mapDispatchToProps = dispatch => ({
  getStaticData: (slug, ref) => {
    dispatch(getStaticData(slug, ref));
  }
});

export default withRedux(initStore, mapStateToProps, mapDispatchToProps)(JoinCommunity)
github nteract / nteract / applications / web / pages / _app.tsx View on Github external
: {};

    return { pageProps };
  }

  render() {
    const { Component, pageProps, store } = this.props;
    return (
      
        
      
    );
  }
}

export default withRedux(configureStore)(NteractApp);
github luckcoding / hotchcms / front / pages / _app.js View on Github external
const {
      Component, pageProps, store, locale,
    } = this.props
    return (
      
        
          
            
          
        
      
    )
  }
}

export default withRedux(configureStore)(withReduxSaga({ async: true })(MyApp))
github zeit / next.js / examples / with-apollo-and-redux / pages / _app.js View on Github external
}

    return { pageProps }
  }

  render () {
    const { Component, pageProps, store } = this.props
    return (
      
        
      
    )
  }
}

export default withRedux(initStore)(MyApp)
github kyle-ssg / nextjs-redux / pages / _app.js View on Github external
{
                            E2E &amp;&amp; (
                                
                                    <div id="e2e-request">
                                    <div id="e2e-error">
                                
                            )
                        }
                    
                
            
        );
    }
}

export default withRedux(createStore)(withReduxSaga(MyApp));
</div></div>
github vthang95 / react-redux-nextjs-antd-boilerplate / store.js View on Github external
  return (component) => withRedux(initStore, mapStateToProps, actions)(component)
}

next-redux-wrapper

Redux wrapper for Next.js

MIT
Latest version published 1 year ago

Package Health Score

64 / 100
Full package analysis

Popular next-redux-wrapper functions

Similar packages