@elyas This hook is meant to be used by reused by various components or functions. By design, it can accept any url as an argument and return any data that gets returned from that API. If you know what kind of data you are expecting to get back, you can make an interface specific for that component.
In this example we know we are expecting to get back movie info and we can adjust the App component like this:
what is the use of coding with ts to put any at data, precisely I would like to know what to put in place of any so that it works in strict mode
@elyas This hook is meant to be used by reused by various components or functions. By design, it can accept any url as an argument and return any data that gets returned from that API. If you know what kind of data you are expecting to get back, you can make an interface specific for that component.
In this example we know we are expecting to get back movie info and we can adjust the App component like this:
The same thing can be done for any API returning "any" kind of data.
setData not dataSet