Skip to content

Commit

Permalink
doc: small improvements on the sample and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
macabeus committed Jun 17, 2021
1 parent 34b5fc8 commit 232439d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const App = () => (
import { useContext } from 'react'
import { GbaContext } from 'react-gbajs'

const Component = () => {
const ButtonStartEmulator = () => {
const {
play,
} = useContext(GbaContext)
Expand All @@ -31,7 +31,9 @@ const Component = () => {
}

return (
<SomeComponent startGame={onSomeHandle}>
<button onClick={() => startEmulator()}>
Start Emulator
</button>
)
}
```
Expand Down
4 changes: 2 additions & 2 deletions sample/src/components/emulator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react'
import GBAEmulator from 'react-gbajs'
import ReactGbaJs from 'react-gbajs'

type Props = { scale: number, printFps: boolean }
const Emulator: FunctionComponent<Props> = ({ scale, printFps }) => {
Expand All @@ -10,7 +10,7 @@ const Emulator: FunctionComponent<Props> = ({ scale, printFps }) => {
)

return (
<GBAEmulator
<ReactGbaJs
onFpsReported={fpsReportCallback}
scale={scale}
volume={0}
Expand Down

0 comments on commit 232439d

Please sign in to comment.