Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
React is a JavaScript library for building user interfaces. It uses a declarative paradigm that makes it easier to reason about your application and aims to be both efficient and flexible.
2
votes
1
answer
26
views
Update user name within participants of chats
I have the function which updates user data (currently only name). I would like to optimize its logic and particularly logic of updating participant name in chats. Currently I get entire chats collect …
1
vote
0
answers
26
views
Color mode switching in a React App
I'm using a custom hook to handle light/dark mode toggling in my React app, which leverages MUI's theming. The hook manages the mode state, stores it in localStorage, and provides a toggleColorMode fu …
4
votes
2
answers
469
views
LoginForm submission which sends sign in link to email and then sets value in localStorage
My code works perfectly to send a sign in link via email, but for additional optimization I wonder can I use onSubmit with useMutation from the React Query library - is it even possible?
Code:
export …
1
vote
1
answer
36
views
Optimizing react router configuration for E-commerce app
I have a React app using react-router-dom and I want to ensure my routing configuration is efficient and maintainable. Below is my current router setup:
<BrowserRouter>
<ScrollToTop />
<Routes …
2
votes
0
answers
22
views
Optimization of React Product Page component
I was working on Product Page with its nested children. On the page we can see a specific product data, add item to the cart and set quantity which we want to add. The codebase is nasty as I only fini …
1
vote
0
answers
30
views
How can I optimize ProductCard component and its render method in React
ExclusiveOffers swiper:
export const ExclusiveOffers = () => {
const theme = useTheme();
const { category } = useParams();
const { data, isLoading } = useGetProductsQuery(category);
const mem …