Skip to content

Commit

Permalink
fix: update GBAProvider prop types for React 18 (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: macabeus <[email protected]>
  • Loading branch information
VladCuciureanu and macabeus authored Jul 12, 2023
1 parent a643af5 commit 159836d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/react/gba-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import React, { FunctionComponent, useState, useRef } from 'react'
import React, { FunctionComponent, useState, useRef, ReactNode } from 'react'
import cloneDeep from 'lodash.clonedeep'
import drawEmulator from '../emulator'
import GbaContext from './gba-context'

const GbaProvider: FunctionComponent = ({ children }) => {
type Props = {
children?: ReactNode
};

const GbaProvider: FunctionComponent<Props> = ({ children }) => {
const [gba, setGba] = useState<Gba>()
const canvasRef = useRef<HTMLCanvasElement>(null)
const [fpsCallback, setFpsCallback] = useState<FpsCallback>()
Expand Down

0 comments on commit 159836d

Please sign in to comment.