ReactNative LPU
Are you a driven mind with impeccable skills? We at Affixious bring to you our eagerly awaited campus recruitment exam duly designed to evaluate your technical skills. Take this short test and stand a chance to be part of the Affixious family.
Kindly fill in your contact details.
1 / 20
1. Which below statement is correct about Props?
2 / 20
2. What do you need to change about this code to get it to run?
const clock = (props) => {
return <Text>Look at the time: {props.time}</Text>;
};
3 / 20
3. What is [e.target.id] called in this code snippet?
const handleChange = (e) => {
setState((prevState) => ({ ...prevState, [e.target.id]: e.target.value }));
4 / 20
4. Why is it a good idea to pass a function to setState instead of an object?
5 / 20
5. Describe what is happening in this code?
const { name: firstName } = props;
6 / 20
6. What is the process of deciding whether an update is necessary?
7 / 20
7. What will happen when this useEffect Hook is executed, assuming name is not already equal to shiv?
useEffect(() => {
setName('shiv');
}, [name]);
8 / 20
8. Which below statement is wrong about React-Native?
9 / 20
9. What is sent to an Array.map() function?
10 / 20
10. In which lifecycle method do you make requests for data in a class component?
11 / 20
11. What value of button will allow you to pass the name of the person to be hugged?
class Huggable extends React.Component {
hug(id) {
console.log("hugging " + id);
}
render() {
let name = "kitten";
let button = // Missing code
return button;
12 / 20
12. Per the following code, when is the Hello component assigned to greeting?
const greeting = isLoggedIn ? <Hello /> : null;
13 / 20
13. Disadvantage of React-Native?
14 / 20
14. How do you invoke setDone only when component mounts, using hooks?
function MyComponent(props) {
const [done, setDone] = useState(false);
return <Text>Done: {done}</Text>;
15 / 20
15. In this function, which is the best way to describe the Dish component?
function Dish() {
return (
<>
<Ingredient />
</>
);
16 / 20
16. This code is part of an app that collects Pokemon. The useState hook below is a piece of state holding onto the names of the Pokemon collected so far. How would you access the collected Pokemon in state?
const PokeDex = (props) => {
const [pokeDex, setPokeDex] = useState([]);
/// ...
17 / 20
17. Which below statement is wrong?
18 / 20
18. How might you check property types without using Flow or TypeScript?
19 / 20
19. Which below statement is wrong about FLATLIST?
20 / 20
20. Which below statement is wrong about Controlled Component?
Your score is
The average score is 15%
Restart quiz