Skip to content

Commit

Permalink
docs(README): typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ckknight authored Nov 3, 2018
1 parent ad5a065 commit 93b1713
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ yarn add react-pirate
setPreviousTime(currentTime)
}

setInterval(() => setCurrentTime(currentTime + 1000), 1000)
useInterval(() => setCurrentTime(currentTime + 1000), 1000)

return (
<div>
Expand All @@ -78,7 +78,7 @@ yarn add react-pirate
function Ship(props) {
useTimeout(() => {
if (props.isAtSee) {
if (props.isAtSea) {
props.returnToPort()
}
}, 1000)
Expand Down Expand Up @@ -122,23 +122,23 @@ Lifecycle hooks helps you simulate your good ol' `React.Component` lifecycle met
- `componentDidMount`:

```jsx
import React, { useLayout } from 'react'
import React, { useLayoutEffect } from 'react'
import { useMount } from 'react-pirate'
function Ship(props) {
useMount(() => {
// quite similar to `componentDidMount`
})
return <p>This is my Ship, it's name is {props.name}</p>
return <p>This is my Ship, its name is {props.name}</p>
}
function Captain(props) {
useMount(
() => {
// similar to `componentDidMount`
},
{ hook: useLayout },
{ hook: useLayoutEffect },
)
return <p>This is the captain of the {props.shipName} !</p>
Expand All @@ -148,23 +148,23 @@ Lifecycle hooks helps you simulate your good ol' `React.Component` lifecycle met
- `componentDidUpdate`:

```jsx
import React, { useLayout } from 'react'
import React, { useLayoutEffect } from 'react'
import { useUpdate, useLegacyUpdate } from 'react-pirate'
function Ship(props) {
useUpdate(() => {
// quite similar to `componentDidUpdate`
})
return <p>This is my Ship, it's name is {props.name}</p>
return <p>This is my Ship, its name is {props.name}</p>
}
function Captain(props) {
useUpdate(
() => {
// similar to `componentDidUpdate`
},
{ hook: useLayout },
{ hook: useLayoutEffect },
)
return <p>This is the captain of the {props.shipName} !</p>
Expand All @@ -174,23 +174,23 @@ Lifecycle hooks helps you simulate your good ol' `React.Component` lifecycle met
- `componentWillUnmount`:

```jsx
import React, { useLayout } from 'react'
import React, { useLayoutEffect } from 'react'
import { useUnmount, useLegacyUnmount } from 'react-pirate'
function Ship(props) {
useUnmount(() => {
// quite similar to `componentWillUnmount`
})
return <p>This is my Ship, it's name is {props.name}</p>
return <p>This is my Ship, its name is {props.name}</p>
}
function Captain(props) {
useUnmount(
() => {
// similar to `componentWillUnmount`
},
{ hook: useLayout },
{ hook: useLayoutEffect },
)
return <p>This is the captain of the {props.shipName} !</p>
Expand All @@ -203,7 +203,7 @@ Lifecycle hooks helps you simulate your good ol' `React.Component` lifecycle met
import React from 'react'
import { useState } from 'react'
function Firstmate(props) {
function FirstMate(props) {
const [captain, setCaptain] = useState(null)
if (!captain && props.ship) {
Expand Down

0 comments on commit 93b1713

Please sign in to comment.