Check out example codes for "ecs get specific entities with component". It will help you in understanding the concepts better.

Code Example 1

EntityQuery m_Group = GetEntityQuery(typeof(RotationQuaternion), ComponentType.ReadOnly<RotationSpeed>());

Learn ReactJs, React Native from akashmittal.com