Check out example codes for "general sibling selector". It will help you in understanding the concepts better.

Code Example 1

/* The general sibling combinator (~) separates
two selectors and matches the second element 
only if it follows the first element 
(though not necessarily immediately), 
and both are children of the same parent element. */

/* Paragraphs that are siblings of and
   subsequent to any image will be red */

img ~ p {
  color: red;

<img src="myimg.png"/>
<p>This will be red!</p>

Learn ReactJs, React Native from