共同実施(Redux,TS)
1185 ワード
ターミナルサービスルータのインストール
の後にas constを付けて、後でアクションオブジェクトを作成します. はタイプ値の一部です action.typeはstringと推定されず、「counter/INCREASE」のように実際の文字列値と推定される.
yarn add react-router-dom @types/react-router-dom
1.ファイル構造
2. modules/counter.tsファイル
3.components/Counter.tsxファイル
4. containers/CounterContainer.tsxファイル
★ 5. modules/index.ts RootReducer宣言!
6. App.tsx//counterContainer戻り
★ 7. index.tsx // store
実行結果
Reference
この問題について(共同実施(Redux,TS)), 我々は、より多くの情報をここで見つけました https://velog.io/@hyunjoong/Counter-구현-Redux-TSテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol