Skip to content

Commit 32e3bd4

Browse files
jeroenvanrielabzainuddin
authored andcommitted
Fix headings for constructor arguments
1 parent fe4a8ee commit 32e3bd4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ A model or collection can only do requests to an API if you add an `api` instanc
3131

3232
A model is a data container with a set of helper functions. Models should extend `Model` from mobx-spine, and the very least define some properties.
3333

34-
### Constructor: data
35-
3634
The `Model` contructor takes 2 arguments:
3735
- `data`: An object with default values for a model.
3836
- `options`: An object with options.
3937

38+
### Constructor: data
39+
40+
Let's for example define a class `Animal` with 2 properties `id` and `name`.
41+
4042
```js
4143
import { observable } from 'mobx';
4244
import { Model } from 'mobx-spine';
@@ -48,7 +50,7 @@ class Animal extends Model {
4850
}
4951
```
5052

51-
We've defined a class `Animal` with 2 properties `id` and `name`. If we instantiate a new animal without arguments it will create an empty animal using defaults defined on the model:
53+
If we instantiate a new animal without arguments it will create an empty animal using defaults defined on the model:
5254

5355
```js
5456
// Create an empty instance of an Animal.

0 commit comments

Comments
 (0)