Skip to content

Commit 249ecd9

Browse files
docs(website): change out Overmind with createOvermind
1 parent 6ccf297 commit 249ecd9

File tree

25 files changed

+78
-80
lines changed

25 files changed

+78
-80
lines changed

packages/overmind-website/examples/api/app_initialize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ const config = {
2525
{
2626
fileName: 'overmind/index.js',
2727
code: `
28-
import { Overmind } from 'overmind'
28+
import { createOvermind } from 'overmind'
2929
import { createConnect } from 'overmind-${view}'
3030
import state from './state'
3131
import * as effects from './effects'
3232
import * as actions from './actions'
3333
34-
export const overmind = new Overmind({
34+
export const overmind = createOvermind({
3535
state,
3636
effects,
3737
actions

packages/overmind-website/examples/api/app_options_devtools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default (ts) =>
66
code: `
77
...
88
9-
export const overmind = new Overmind(config, {
9+
export const overmind = createOvermind(config, {
1010
devtools: true // 'localhost:3031'
1111
})
1212
`,
@@ -18,7 +18,7 @@ export const overmind = new Overmind(config, {
1818
code: `
1919
...
2020
21-
export const overmind = new Overmind(config, {
21+
export const overmind = createOvermind(config, {
2222
devtools: true // 'localhost:3031'
2323
})
2424
`,

packages/overmind-website/examples/api/app_options_logproxies.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default (ts) =>
66
code: `
77
...
88
9-
export const overmind = new Overmind(config, {
9+
export const overmind = createOvermind(config, {
1010
logProxies: false
1111
})
1212
`,
@@ -18,7 +18,7 @@ export const overmind = new Overmind(config, {
1818
code: `
1919
...
2020
21-
export const overmind = new Overmind(config, {
21+
export const overmind = createOvermind(config, {
2222
logProxies: false
2323
})
2424
`,

packages/overmind-website/examples/api/app_options_name.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export default (ts) =>
66
code: `
77
...
88
9-
export const overmindA = new Overmind(configA, {
9+
export const overmindA = createOvermind(configA, {
1010
name: 'appA'
1111
})
1212
13-
export const overmindB = new Overmind(configB, {
13+
export const overmindB = createOvermind(configB, {
1414
name: 'appB'
1515
})
1616
`,
@@ -22,11 +22,11 @@ export const overmindB = new Overmind(configB, {
2222
code: `
2323
...
2424
25-
export const overmindA = new Overmind(configA, {
25+
export const overmindA = createOvermind(configA, {
2626
name: 'appA'
2727
})
2828
29-
export const overmindB = new Overmind(configB, {
29+
export const overmindB = createOvermind(configB, {
3030
name: 'appB'
3131
})
3232
`,

packages/overmind-website/examples/api/config_lazy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default (ts) =>
44
{
55
fileName: 'overmind.ts',
66
code: `
7-
import { Overmind, IConfig } from 'overmind'
7+
import { createOvermind, IConfig } from 'overmind'
88
import { lazy } from 'overmind/config'
99
import { Config as ModuleAConfig } from './moduleA'
1010
import { Config as ModuleBConfig } from './moduleB'
@@ -18,7 +18,7 @@ declare module 'overmind' {
1818
interface Config extends IConfig<typeof config> {}
1919
}
2020
21-
const overmind = new Overmind(config)
21+
const overmind = createOvermind(config)
2222
2323
overmind.actions.lazy.loadConfig('moduleA')
2424
@@ -30,15 +30,15 @@ export default overmind
3030
{
3131
fileName: 'overmind/index.js',
3232
code: `
33-
import { Overmind } from 'overmind'
33+
import { createOvermind } from 'overmind'
3434
import { lazy } from 'overmind/config'
3535
3636
const config = lazy({
3737
moduleA: () => import('./moduleA'),
3838
moduleB: () => import('./moduleB')
3939
})
4040
41-
const overmind = new Overmind(config)
41+
const overmind = createOvermind(config)
4242
4343
overmind.actions.lazy.loadConfig('moduleA')
4444

packages/overmind-website/examples/api/config_merge.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default (ts) =>
44
{
55
fileName: 'overmind.ts',
66
code: `
7-
import { Overmind, IConfig } from 'overmind'
7+
import { createOvermind, IConfig } from 'overmind'
88
import { merge } from 'overmind/config'
99
import * as moduleA from './moduleA'
1010
import * as moduleB from './moduleB'
@@ -15,22 +15,22 @@ declare module 'overmind' {
1515
interface Config extends IConfig<typeof config> {}
1616
}
1717
18-
export default new Overmind(config)
18+
export default createOvermind(config)
1919
`,
2020
},
2121
]
2222
: [
2323
{
2424
fileName: 'overmind/index.js',
2525
code: `
26-
import { Overmind} from 'overmind'
26+
import { createOvermind } from 'overmind'
2727
import { merge } from 'overmind/config'
2828
import * as moduleA from './moduleA'
2929
import * as moduleB from './moduleB'
3030
3131
const config = merge(moduleA, moduleB)
3232
33-
export default new Overmind(config)
33+
export default createOvermind(config)
3434
`,
3535
},
3636
]

packages/overmind-website/examples/api/config_namespaced.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default (ts) =>
44
{
55
fileName: 'overmind.ts',
66
code: `
7-
import { Overmind, IConfig } from 'overmind'
7+
import { createOvermind, IConfig } from 'overmind'
88
import { namespaced } from 'overmind/config'
99
import * as moduleA from './moduleA'
1010
import * as moduleB from './moduleB'
@@ -18,7 +18,7 @@ declare module 'overmind' {
1818
interface Config extends IConfig<typeof config> {}
1919
}
2020
21-
const overmind = new Overmind(config)
21+
const overmind = createOvermind(config)
2222
2323
export default overmind
2424
`,
@@ -28,7 +28,7 @@ export default overmind
2828
{
2929
fileName: 'overmind/index.js',
3030
code: `
31-
import { Overmind} from 'overmind'
31+
import { createOvermind } from 'overmind'
3232
import { namespaced } from 'overmind/config'
3333
import * as moduleA from './moduleA'
3434
import * as moduleB from './moduleB'
@@ -38,7 +38,7 @@ const config = namespaced({
3838
moduleB
3939
})
4040
41-
const overmind = new Overmind(config)
41+
const overmind = createOvermind(config)
4242
4343
export default overmind
4444
`,

packages/overmind-website/examples/api/onInitialize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ export default onInitialize
5959
{
6060
fileName: 'overmind/index.js',
6161
code: `
62-
import { Overmind } from 'overmind'
62+
import { createOvermind } from 'overmind'
6363
import onInitialize from './onInitialize'
6464
import { state } from './state'
6565
import * as actions from './actions'
6666
67-
const overmind = new Overmind({
67+
const overmind = createOvermind({
6868
onInitialize,
6969
state,
7070
actions

packages/overmind-website/examples/guide/getstarted/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ const config = {
3737
{
3838
fileName: 'overmind/index.js',
3939
code: `
40-
import { Overmind } from 'overmind'
40+
import { createOvermind } from 'overmind'
4141
import { createConnect } from 'overmind-${view}'
4242
43-
export const overmind = new Overmind({
43+
export const overmind = createOvermind({
4444
state: {
4545
isLoadingPosts: false,
4646
posts: []

packages/overmind-website/examples/guide/getstarted/createapp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const javascript = {
55
{
66
fileName: 'overmind/index.js',
77
code: `
8-
import { Overmind } from 'overmind'
8+
import { createOvermind } from 'overmind'
99
import { createHook } from 'overmind-react'
1010
11-
export const overmind = new Overmind({
11+
export const overmind = createOvermind({
1212
state: {
1313
isLoadingPosts: false
1414
}
@@ -22,10 +22,10 @@ export const useOvermind = createHook(overmind)
2222
{
2323
fileName: 'overmind/index.js',
2424
code: `
25-
import { Overmind } from 'overmind'
25+
import { createOvermind } from 'overmind'
2626
import { createPlugin } from 'overmind-vue'
2727
28-
export const overmind = new Overmind({
28+
export const overmind = createOvermind({
2929
state: {
3030
isLoadingPosts: false
3131
}

0 commit comments

Comments
 (0)