Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 379a968

Browse files
committed
add withInit to docs
1 parent f035366 commit 379a968

File tree

16 files changed

+29
-16
lines changed

16 files changed

+29
-16
lines changed

docs/src/components/app/app.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@ import AddCallback from '../routes/add-callback';
55
import AddReducer from '../routes/add-reducer';
66
import CreateProvider from '../routes/create-provider';
77
import GetGlobal from '../routes/get-global';
8+
import Install from '../routes/install';
89
import RemoveCallback from '../routes/remove-callback';
910
import ResetGlobal from '../routes/reset-global';
1011
import SetGlobal from '../routes/set-global';
12+
import Support from '../routes/support';
1113
import UseDispatch from '../routes/use-dispatch';
1214
import UseGlobal from '../routes/use-global';
1315
import WithGlobal from '../routes/with-global';
14-
import Support from '../routes/support';
15-
import Install from '../routes/install';
16+
import WithInit from '../routes/with-init';
1617
import './app.scss';
1718
import Header from './header';
1819
import Navigation from './navigation';
1920

2021

2122

22-
export default function App() {
23+
export default function App(): JSX.Element {
2324
return (
2425
<div className="app">
2526
<Header />
@@ -73,6 +74,10 @@ export default function App() {
7374
component={WithGlobal}
7475
path="/withGlobal"
7576
/>
77+
<Route
78+
component={WithInit}
79+
path="/withInit"
80+
/>
7681

7782
{/* Support */}
7883
<Route

docs/src/components/routes/about/about.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface Props {
88
export default withGlobal(
99
({ color }) => ({ color }),
1010
)(
11-
function About({ color }) {
11+
function About({ color }: Props): JSX.Element {
1212
const setColor = useDispatch('setColor');
1313
setColor('#61DAFB');
1414
return <>

docs/src/components/routes/add-callback/add-callback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function AddCallback() {
3+
export default function AddCallback(): JSX.Element {
44
return (
55
<>
66
<p>

docs/src/components/routes/add-reducer/add-reducer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function AddReducer() {
3+
export default function AddReducer(): JSX.Element {
44
return (
55
<>
66
<p>Use <code>addReducer</code> to add a reducer to your global state.</p>

docs/src/components/routes/create-provider/create-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function CreateProvider() {
3+
export default function CreateProvider(): JSX.Element {
44
return (
55
<p>Coming soon...</p>
66
);

docs/src/components/routes/get-global/get-global.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function GetGlobal() {
3+
export default function GetGlobal(): JSX.Element {
44
return (
55
<p>Coming soon...</p>
66
);

docs/src/components/routes/install/install.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useDispatch } from 'reactn';
22

3-
export default function Install() {
3+
export default function Install(): JSX.Element {
44
const setColor = useDispatch('setColor');
55
setColor('#FF0000');
66
return <>

docs/src/components/routes/remove-callback/remove-callback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function RemoveCallback() {
3+
export default function RemoveCallback(): JSX.Element {
44
return (
55
<p>Coming soon...</p>
66
);

docs/src/components/routes/reset-global/reset-global.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function ResetGlobal() {
3+
export default function ResetGlobal(): JSX.Element {
44
return (
55
<p>Coming soon...</p>
66
);

docs/src/components/routes/set-global/set-global.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'reactn';
22

3-
export default function SetGlobal() {
3+
export default function SetGlobal(): JSX.Element {
44
return (
55
<p>Coming soon...</p>
66
);

0 commit comments

Comments
 (0)