Updating State does not rerender when calling a method on my class
I am setting a state with new FileSystem()
After calling the createDirectory method which adds a new child directory to the current directory of the file system object it does not rerender the component.
const [fs, setFS] = useState<FileSystem>(new FileSystem());
useEffect(() => {
fs.createDirectory("first dir");
setFS(() => fs);
}, []);
After calling the createDirectory method which adds a new child directory to the current directory of the file system object it does not rerender the component.
const [fs, setFS] = useState<FileSystem>(new FileSystem());
useEffect(() => {
fs.createDirectory("first dir");
setFS(() => fs);
}, []);
