Open NouraldinS opened 2 years ago
JSON.parse alone is an expensive computation that you shouldn't use on every render, not to mention the map and fetching from local storage. Always memoize any data that is the result of a function call. https://github.com/AhmedYahya24/spzceX/blob/d753e7f6e31fa36501ca331d113bc0521a555a4d/space-x-graphql/src/pages/Missions/Missions.jsx#L45-L47
JSON.parse
JSON.parse
alone is an expensive computation that you shouldn't use on every render, not to mention the map and fetching from local storage. Always memoize any data that is the result of a function call. https://github.com/AhmedYahya24/spzceX/blob/d753e7f6e31fa36501ca331d113bc0521a555a4d/space-x-graphql/src/pages/Missions/Missions.jsx#L45-L47