2/n reduce react re-renders
This commit is contained in:
parent
e6ef3ff23f
commit
89bbcd2a27
7 changed files with 66 additions and 25 deletions
|
|
@ -8,7 +8,9 @@ export const RootContent = (props: {}) => {
|
|||
let setCloseableError = useErrorStore((state) => state.setCloseableError);
|
||||
let otherError = useErrorStore((state) => state.otherError);
|
||||
let torrents = useTorrentStore((state) => state.torrents);
|
||||
let torrentsLoading = useTorrentStore((state) => state.torrentsLoading);
|
||||
let torrentsInitiallyLoading = useTorrentStore(
|
||||
(state) => state.torrentsInitiallyLoading
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="container mx-auto">
|
||||
|
|
@ -17,7 +19,7 @@ export const RootContent = (props: {}) => {
|
|||
remove={() => setCloseableError(null)}
|
||||
/>
|
||||
<ErrorComponent error={otherError} />
|
||||
<TorrentsList torrents={torrents} loading={torrentsLoading} />
|
||||
<TorrentsList torrents={torrents} loading={torrentsInitiallyLoading} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue