title: Using React Hooks to Show Component Render Time and Date
body: <p>My application contains a view that is a functional react component. I'm trying to add a timestamp at the bottom of the view displaying the date and time when the user navigated to this view. I'm wondering what would be appropriate way to implement this using hooks. I guess one option would be to use <code>const [date] = useState(new Date())</code> and simply provide no setter for the state since it would never change. However, this makes me wonder if <code>useState</code> is the appropriate hook to begin with. Should I just do <code>const date = new Date()</code> in the component body or would that have some unexpected side effects?</p>