From 0ba1a0197307fffc51ce1f4cf56014d1a3938442 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Fri, 24 Jan 2020 18:15:10 +0530 Subject: [PATCH] index.tsx - Consume store in component --- src/index.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 5d863b2..fb148df 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3,15 +3,26 @@ */ import * as React from "react"; +import { Provider } from "react-redux"; +import configureStore from "./store"; +import { initSourceFile, updateSourceFile } from "./store/sourceFiles/actions"; import styles from "./styles.css"; export type Props = { text: string }; -export default class ExampleComponent extends React.Component { +const store = configureStore(); + +export class ExampleComponent extends React.Component { render() { const { text } = this.props; - return
Example Component: {text}
; + return ( + +
Example Component: {text}
+
+ ); } } + +export { initSourceFile, updateSourceFile };