Q. Which lifecycle method is commonly used to fetch data from an API in a React component?