Skip to content

Instantly share code, notes, and snippets.

@treyhuffine
Created April 20, 2019 22:50
Show Gist options
  • Save treyhuffine/54734c7ac686ede6e74775ade216a083 to your computer and use it in GitHub Desktop.
Save treyhuffine/54734c7ac686ede6e74775ade216a083 to your computer and use it in GitHub Desktop.
export interface OwnProps {
handleIdChange: (newId: number) => void;
}
interface Props extends OwnProps {
data: LaunchListQuery;
}
// ...
const LaunchList: React.FC<Props> = ({ data, handleIdChange }) => (
// ...
<li
key={i}
className={`${className}__item`}
onClick={() => handleIdChange(launch.flight_number!)}
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment