0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Harmoware-VIS】独自のActionを追加する

Posted at

#Harmoware-VIS とは

#独自のActionを追加する

Harmoware-VIS を使用したアプリで独自のAction(reducer)をマージしたい場合は以下のようにします。
React.jsの作法と同じです

index.js
import { render } from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import { getCombinedReducer } from 'harmoware-vis';
import * as React from 'react';
import App from './containers';
import reducer from './reducers'; //独自のreducerをimport

// importした独自のreducerを連結したstoreを生成
const store = createStore(getCombinedReducer({reducer}));

render(
  <Provider store={store}>
      <App />
  </Provider>,
  document.getElementById('app')
);
app.js
import { connectToHarmowareVis } from 'harmoware-vis';
import * as moreActions from '../actions'; //独自のactionsをimport

class App extends Container {
・・・
}
// importした独自のactionsを接続
export default connectToHarmowareVis(App, moreActions);
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?