Final answer:
A simple performance optimization for a function component in React is to use memoization with React.memo.
Step-by-step explanation:
A simple performance optimization for a function component in React is to use memoization. Memoization is the process of caching the result of a function based on its input, so that the function doesn't have to recompute the result if the input hasn't changed. In React, you can use the React.memo higher-order component to automatically memoize a function component.
For example:
import React from 'react';
const MyComponent = React.memo((props) => {
// render component here
});
In this example, the MyComponent function component will only re-render if the props have changed, otherwise it will use the cached result and improve performance.