-
What is the InteractionManager and how is it used? Why is it important?
-
Which node_modules will run in React Native? How can we test for this?
-
What is wrong with this code for querying a native API?
class Gyros {
setGyroPosition(pos) {
if (pos=== null || typeof pos === "undefined") {
throw new Error("The position must be defined");
}
this.pos = pos
}
constructor(){
const gyroscopePosition = NativeModules.MyGyroModule.gyroPosition();
this.setGyroPosition(gyroscopePosition);
}
}
- Write a reducer function that returns a newstate with isAuthorized set to true.
const initialState = {
user: {
isAuthorized: false,
}
};
The reducer function has the following signature: (previousState = initialState, action) => newState, where the action has a payload containing a property isAuthorized set to true.
a) Write a pseudo-code that uses the fetch API which makes request to https://jsonplaceholder.typicode.com/users/
b) Render a list in the UI