I have a question related to React development. Let's say I have a div element with some html text inside, which may include bold formatting and other css styles. In my React project, I want to adjust the height of this div if the content exceeds 5 lines. Should I make this change in the componentDidMount or componentWillUpdate method? I appreciate any guidance on this matter. Thank you!