perf: add memo to react components

This commit is contained in:
SethBurkart123
2024-02-04 21:13:56 +11:00
parent 629a88a463
commit f5dfba2872
8 changed files with 25 additions and 15 deletions
+5 -3
View File
@@ -3,9 +3,9 @@ import { useSettingsContext } from '../SettingsContext';
import { motion } from "framer-motion";
import "./Picker.css";
import { useEffect, useState } from 'react';
import { memo, useEffect, useState } from 'react';
export default function Picker() {
function Picker() {
const { settingsState, setSettingsState, showPicker, setShowPicker } = useSettingsContext();
const defaultPresets = [
@@ -123,4 +123,6 @@ export default function Picker() {
</div>
</motion.div>
);
}
}
export default memo(Picker);