Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
andywhite37 committed Jul 11, 2019
1 parent d923fa6 commit e9fad0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.re linguist-language=Reason
*.rei linguist-language=Reason
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ you to change the state, whereas the `ReludeReact.useReducer` allows you to both

To use the `ReludeReact.useReducer` hook, you must provide a reducer function of the following type:

```reasonml
```reason
type reducer('action, 'state) = ('action, 'state) => update('action, 'state);
```

A function that accepts an `'action` and the current `'state`, and returns a value of type `update('action, 'state)`

The `update` value is a variant with the following type:

```reasonml
```reason
type update('action, 'state) =
| NoUpdate
| Update('state)
Expand Down Expand Up @@ -58,7 +58,7 @@ Update the component state to the given value, and perform the given side effect

These types of side effects are useful for doing things like pushing a history state to navigate to a different URL, doing one-off DOM manipulations, or other types of things you don't want or need to manage or control.

#### `SideEffect(...)`
#### `SideEffect`

Same as `UpdateWithSideEffect`, but with no state update.

Expand Down Expand Up @@ -109,7 +109,7 @@ See the demo app in `examples/demo`

Below is a somewhat contrived/simple example fo what a `ReludeReact` component might look like.

```reasonml
```reason
// AnimalListView.re
// The state of your component.
Expand Down

0 comments on commit e9fad0f

Please sign in to comment.