Skip to content
Advertisement

Tag: react-native

React Navigation navigation.navigate(“SomeScreen”) error in TypeScript

A common error which occurs in react-navigation, when using TypeScript, is: Argument of type ‘string’ is not assignable to parameter of type ‘{ key: string; params?: undefined; merge?: boolean | undefined; } | { name: never; key?: string | undefined; params: never; merge?: boolean | undefined; }’ What could this be caused by? Answer This occurs when types for specific

Defining hooks inside an array

I would like to create a bunch of filters to pause or play my Video. My implementation is something like as shown below: I know defining hooks inside an if condition is not correct. But how about defining them as above? Could it be done in a better way? Answer In order for React to correctly preserve the state of

Why are showing blank page in reactjs?

I am using class and constructor in react-js but this program does not error is thrown in console. show a message only blank. what is wrong? Answer You need to pass it as <Component />. And Still doesn’t work then add your index.html, there might be the issue then. PS: If you want to render only element only html element

Advertisement