Check out example codes for "Property 'val' does not exist on type 'Readonly<{}>". It will help you in understanding the concepts better.

Code Example 1

class App extends React.component<{},any>{ //your code}

Learn ReactJs, React Native from akashmittal.com