A configuration object mapping each BallType to an image URL. See LottoBallImageSrcConfig
A memoized LottoBallListComponent ready to be used.
const MyComponent = () => {
const lottoBallSrcConfig = { [BallType.SelfPick]: './ball.png', ... };
const LottoBallList = useCreateLottoBallList(lottoBallSrcConfig);
const balls = [{ value: 1, type: BallType.SelfPick }];
return <LottoBallList ballList={balls} maximumPick={5} />;
}
Generated using TypeDoc
A React hook that returns a memoized
LottoBallListComponent. This is the primary way to create a configurable list of lotto balls. Using this hook prevents the component from being recreated on every render.