Check out example codes for "how to make a toast in a fragment kotlin". It will help you in understanding the concepts better.

Code Example 1

Toast.makeText(activity, "Toast", Toast.LENGTH_SHORT).show()

Learn ReactJs, React Native from akashmittal.com