Event calendar rerender optimization attempt

This commit is contained in:
Milan Paunovic
2024-10-20 13:04:26 +02:00
parent a9c02e880f
commit da071736d0
2 changed files with 40 additions and 13 deletions

View File

@ -136,7 +136,7 @@ export const ToDosContextProvider: FC<{ children: ReactNode }> = ({
};
return (
<ToDosContext.Provider value={{ toDos, updateToDo, addToDo, maxPoints }}>
<ToDosContext.Provider value={{ toDos: toDos ?? [], updateToDo, addToDo, maxPoints }}>
{children}
</ToDosContext.Provider>
);