Check out example codes for "stateless widget flutter". It will help you in understanding the concepts better.

Code Example 1

class GreenFrog extends StatelessWidget {
  const GreenFrog({ Key key }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(color: const Color(0xFF2DBD3A));
  }
}

Learn ReactJs, React Native from akashmittal.com