You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Curated top React.js interview questions with high quality answers for acing you
38
38
| 28 |[What is React strict mode and what are its benefits?](#what-is-react-strict-mode-and-what-are-its-benefits)|
39
39
| 29 |[How do you localize React applications?](#how-do-you-localize-react-applications)|
40
40
| 30 |[What is code splitting in a React application?](#what-is-code-splitting-in-a-react-application)|
41
-
| 31 |[How would one optimise the performance of React contexts to reduce rerenders?](#how-would-one-optimise-the-performance-of-react-contexts-to-reduce-rerenders)|
41
+
| 31 |[How would one optimize the performance of React contexts to reduce rerenders?](#how-would-one-optimize-the-performance-of-react-contexts-to-reduce-rerenders)|
42
42
| 32 |[What are higher order components in React?](#what-are-higher-order-components-in-react)|
43
43
| 33 |[Explain one-way data flow of React and its benefits](#explain-one-way-data-flow-of-react-and-its-benefits)|
44
44
| 34 |[How do you handle asynchronous data loading in React applications?](#how-do-you-handle-asynchronous-data-loading-in-react-applications)|
@@ -656,21 +656,21 @@ Curated top React.js interview questions with high quality answers for acing you
656
656
<br>
657
657
<br>
658
658
659
-
31. ### How would one optimise the performance of React contexts to reduce rerenders?
659
+
31. ### How would one optimize the performance of React contexts to reduce rerenders?
To optimize the performance of React contexts and reduce rerenders, you can use techniques such as memoizing context values, splitting contexts, and using selectors. Memoizing context values with `useMemo` ensures that the context value only changes when its dependencies change. Splitting contexts allows you to isolate state changes to specific parts of your application. Using selectors with libraries like `use-context-selector` can help you only rerender components that actually need the updated context value.
> Read the [detailed answer](https://greatfrontend.com/questions/quiz/how-would-one-optimise-the-performance-of-react-contexts-to-reduce-rerenders) on [GreatFrontEnd](https://greatfrontend.com/) which allows progress tracking, contains more code samples, and useful resources.
673
+
> Read the [detailed answer](https://greatfrontend.com/questions/quiz/how-would-one-optimize-the-performance-of-react-contexts-to-reduce-rerenders) on [GreatFrontEnd](https://greatfrontend.com/) which allows progress tracking, contains more code samples, and useful resources.
0 commit comments