import React from 'react';
import ReactDOM from 'react-dom';
import * as serviceWorker from './serviceWorker';
import {Provider} from "react-redux";
import store from "./Store/store";
import Counter from "./Component/Container";
ReactDOM.render(
<Provider store={store}>
<Counter />
</Provider>,
document.getElementById('root')
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
▸ この snippet は実行結果未収録
▸ 実行結果は未収録です
Source収録記事
この snippet は記事の「各ソースコード / Index.tsx」セクションに登場する。コードの前後の文脈・ハマりどころの解説は記事本文で。
同じ記事から
5 件import {Action} from 'redux' export enum ActionNames{ Increment = 'inc',未収録
Action
#471a1378c67a
import {ActionNames, ActionType} from "../Actions/CounterAction"; export interface IState {未収録
Reducer
#4d8b83057790
import {combineReducers,createStore,Action} from 'redux' import CounterReducer, {IState} from "../Reducers/CounterReducer"; import {ActionType} from "../Actions/CounterAction";未収録
Store
#c018959893e8
import {ReduxAction, ReduxState} from "../Store/store"; import {DecrementAmount, IncrementAmount} from "../Actions/CounterAction"; import {connect} from "react-redux"; import {Dispatch} from "react";未収録
Container
#22309cd4a543
import React from "react"; import {IState} from "../Reducers/CounterReducer"; import {ActionDispather} from "./Container";未収録
Component
#038f1a12561a
