Check out example codes for "postcss TypeError: require is not a function". It will help you in understanding the concepts better.

Code Example 1

    This type of setup worked for me, require calls modified
	to suit my setup.
	You will have to enter the postcss-* pkgs listed in your

module.exports = (ctx) => {
  return {
    map: ctx.env === 'development' ? 'inline' : false,
    plugins: [

Learn ReactJs, React Native from