Check out example codes for "start a particle effect when a button is pushed". It will help you in understanding the concepts better.

Code Example 1

public ParticleSystem particles;

if (Input.GetKeyDown("a")){
	particles.Play();
}

Learn ReactJs, React Native from akashmittal.com