Sha256: d708e60022fda284f8440a78f5a0875a641d656a6e1eca73911702978035ca57

Contents?: true

Size: 880 Bytes

Versions: 5

Compression:

Stored size: 880 Bytes

Contents

import React from 'react';
import ReactOnRails from 'react-on-rails';
import { Provider } from 'react-redux';

import configureStore from '../store/helloWorldStore';
import HelloWorldContainer from '../containers/HelloWorldContainer';

// See documentation for https://github.com/reactjs/react-redux.
// This is how you get props from the Rails view into the redux store.
// This code here binds your smart component to the redux store.
// railsContext provides contextual information especially useful for server rendering, such as
// knowing the locale. See the React on Rails documentation for more info on the railsContext
const HelloWorldApp = (props, _railsContext) => (
  <Provider store={configureStore(props)}>
    <HelloWorldContainer />
  </Provider>
);

// This is how react_on_rails can see the HelloWorldApp in the browser.
ReactOnRails.register({ HelloWorldApp });

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
react_on_rails-6.2.1 lib/generators/react_on_rails/templates/redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt
react_on_rails-6.2.1.rc.3 lib/generators/react_on_rails/templates/redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt
react_on_rails-6.2.1.rc.2 lib/generators/react_on_rails/templates/redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt
react_on_rails-6.2.1.rc.1 lib/generators/react_on_rails/templates/redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt
react_on_rails-6.2.0 lib/generators/react_on_rails/templates/redux/base/client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx.tt