Check out example codes for "default allow all zoom participants to share screen". It will help you in understanding the concepts better.

Code Example 1

Since the latest update changed to allow only host to share you can change
that setting globally.
login to zoom>settings>in meeting (basic)>who can share>all participants

Learn ReactJs, React Native from akashmittal.com