You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Chore: Desktop: Fix eslint issues and strengthen types in NoteEditor.tsx (#10449)
This commit is contained in:
@ -2,9 +2,8 @@ import shim from '../shim';
|
||||
|
||||
const { useRef, useEffect } = shim.react();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const usePrevious = (value: any, initialValue: any = null) => {
|
||||
const ref = useRef(initialValue);
|
||||
const usePrevious = <T> (value: T, initialValue: T = null) => {
|
||||
const ref = useRef<T>(initialValue);
|
||||
useEffect(() => {
|
||||
ref.current = value;
|
||||
});
|
||||
|
Reference in New Issue
Block a user