Check out example codes for "changing scenes in godot". It will help you in understanding the concepts better.

Code Example 1

get_tree().change_scene("res://pathtoscene")

Learn ReactJs, React Native from akashmittal.com