Improve memoization of "ReaderTransitionPage"
- use chapter properties instead of chapter object - only pass "handleBack" in case the transition page is for the first or last chapter
This commit is contained in:
@@ -39,3 +39,5 @@ export const getValueFromObject = <T>(obj: Record<string, any>, key: string): T
|
||||
};
|
||||
|
||||
export const coerceIn = (value: number, min: number, max: number): number => Math.min(Math.max(value, min), max);
|
||||
|
||||
export const noOp = () => {};
|
||||
|
||||
Reference in New Issue
Block a user