Skip to content

Commit 6c8932a

Browse files
docs(website): general doc fixes
1 parent f8d3689 commit 6c8932a

File tree

6 files changed

+43
-11
lines changed

6 files changed

+43
-11
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { getPackageWithVersion } from '../../templates'
2+
3+
export default () => [
4+
{
5+
fileName: 'package.json',
6+
code: `
7+
{
8+
"name": "my-app",
9+
"scripts": {
10+
"start": "concurrently \\"parcel index.html\\" \\"${getPackageWithVersion(
11+
'overmind-devtools'
12+
)}\\""
13+
}
14+
}
15+
`,
16+
},
17+
]

packages/overmind-website/guides/beginner/01_getstarted.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,17 @@ h(Example, { name: "guide/getstarted/devtools_explicit" })
8282

8383
This allows you to control the version you want to use.
8484

85+
You can even:
86+
87+
```marksy
88+
h(Example, { name: "guide/getstarted/devtools_concurrent" })
89+
```
90+
91+
By installing the [concurrently](https://www.npmjs.com/package/concurrently) package you can start your development process and the devtools at the same time.
92+
8593
The Overmind devtools provides us with a pretty amazing experience. We get insights into all the state, changes to that state, actions run, which side effects are run and general stats. This visual overview becomes more and more valuable as complexity increases.
8694

87-
To connect to the devtools simply start the devtools application and refresh your app.
95+
To connect to the devtools simply start the devtools application and refresh your app. If you need to configure where it connects, please look at the [API section](/api/overmind).
8896

8997
## Summary
9098

packages/overmind-website/guides/beginner/02_definingstate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ h(Example, { name: "guide/definingstate/objects" })
2424

2525
### Arrays
2626

27-
Arrays are in a way similar to objects in the sense that they hold other values, but instead of keys pointing to values you have indexes. That means it is ideal for iteration. But more often than not objects are actually better at managing lists of values. We can actually do fine without arrays in our state. It is when we produce the actual user interface that we usually want arrays. You can learn more about this in the [managing lists]() guide.
27+
Arrays are in a way similar to objects in the sense that they hold other values, but instead of keys pointing to values you have indexes. That means it is ideal for iteration. But more often than not objects are actually better at managing lists of values. We can actually do fine without arrays in our state. It is when we produce the actual user interface that we usually want arrays. You can learn more about this in the [managing lists](/guides/intermediate/01_managinglists) guide.
2828

2929
### Strings
3030

packages/overmind-website/guides/intermediate/01_managinglists.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Managing lists
22

3-
Why do we even have a guide to manage lists? Well, lists is a type of state that differs from other state. Both from the perspective of the state itself, but also transforming that state into UI.
3+
Why do we even have a guide to manage lists? Well, lists is a type of state that differs from other state. Both from the perspective of the state itself, but also transforming that state into UI.
4+
5+
```marksy
6+
h(Notice, null, "The discussion of lists is not specific to Overmind and there are no limitations on how you want to approach this. This guide is rather to help you think about how you structure entities (data with an id) to optimally access and render them.")
7+
```
48

59
## Defining the state
610
When we want to render a list of something we want an **array**. This is the data structure we instinctively go to as it basically is a list. But arrays are rarely the way you want to store the actual data of the list.

packages/overmind-website/guides/intermediate/05_writingtests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Testing is a broad subject and everybody has an opinion on it. We can only show
44

55
## Testing actions
66

7-
When testing an action you want to verify that changes to state are performed as expected. To give you the best possible testing experience Overmind has mocking tool called **createMock**. It takes your application configuration and allows you to run actions as if they were run from components.
7+
When testing an action you want to verify that changes to state are performed as expected. To give you the best possible testing experience Overmind has mocking tool called **createOvermindMock**. It takes your application configuration and allows you to run actions as if they were run from components.
88

99
```marksy
1010
h(Example, { name: "guide/writingtests/action.ts" })

packages/overmind-website/src/components/Guide/index.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ const Guide: SFC = () => {
1515
const { state } = useOvermind()
1616
const [content, setContent] = useState(null)
1717

18-
useEffect(() => {
19-
import('../../../guides/' +
20-
state.currentGuide.type +
21-
'/' +
22-
state.currentGuide.title +
23-
'.md').then((module) => setContent(module))
24-
}, [])
18+
useEffect(
19+
() => {
20+
import('../../../guides/' +
21+
state.currentGuide.type +
22+
'/' +
23+
state.currentGuide.title +
24+
'.md').then((module) => setContent(module))
25+
},
26+
[state.currentGuide.type, state.currentGuide.title]
27+
)
2528

2629
if (!content) {
2730
return null

0 commit comments

Comments
 (0)