inteface because pycharm doesn't like untyped function args
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
export default function Square({ value, onClick }) {
|
interface SquareProps {
|
||||||
|
value: string;
|
||||||
|
onClick: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Square({ value, onClick } : SquareProps) {
|
||||||
return (
|
return (
|
||||||
<button className="square" onClick={onClick}>
|
<button className="square" onClick={onClick}>
|
||||||
{value}
|
{value}
|
||||||
|
|||||||
Reference in New Issue
Block a user