How do I make a log after a view loaded?


#1

How do I make a log after a view loaded?


#2

Hi @vincentwordtoday, can you clarify please


#3

If I’m interpreting your question correctly, you can type console.log("View loaded!") inside of the componentDidMount() method of any component. Check for the logs inside of XDE if you’re using XDE. If you’re in Snack, you can see them inside of the window’s bottommost pane.

If you’re curious to learn about what happens as components load, you can read about component lifecycle here: http://www.reactnativeexpress.com/lifecycle_api

Notice that componentDidMount() is called once after the component initially renders.


closed #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.