Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

Improved efficiency.

Daniel9ec208bbef86
diff --git a/src/App.js b/src/App.js
index 170a03d1..c657d275 100644
--- a/src/App.js
+++ b/src/App.js
@@ -69,14 +69,19 @@ function App() {
const res = await fetch(ADDRESS + '/api');
const resJSON = await res.json();
const data = resJSON.reverse();
+ setData(data);
+ }
+
+ useEffect(() => {
const sortedData = sortList(data, sortBy);
setData(sortedData);
- }
+ // eslint-disable-next-line
+ }, [sortBy]);
useEffect(() => {
fetchData();
// eslint-disable-next-line
- }, [sortBy]);
+ }, []);
useEffect(() => {
setNumberOfResults(filteredData.length);