CAMPUS RECRUITMENT EXAMINATION BY AFFIXIOUS

0 votes, 0 avg
2
Created on By Priyanshu Maithani

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. In which lifecycle method do you make requests for data in a class component? 

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. How might you check property types without using Flow or TypeScript? 

4 / 20

4. Which below statement is correct about Props? 

5 / 20

5. In this function, which is the best way to describe the Dish component? 

function Dish() { 

  return ( 

    <> 

      <Ingredient /> 

      <Ingredient /> 

    </> 

 ); 

} 

6 / 20

6. What will happen when this useEffect Hook is executed, assuming name is not already equal to shiv? 

useEffect(() => { 

  setName('shiv'); 

}, [name]); 

7 / 20

7. Disadvantage of React-Native? 

8 / 20

8. How do you invoke setDone only when component mounts, using hooks? 

function MyComponent(props) { 

  const [done, setDone] = useState(false); 

  return <Text>Done: {done}</Text>; 

} 

9 / 20

9. Why is it a good idea to pass a function to setState instead of an object?

10 / 20

10. Per the following code, when is the Hello component assigned to greeting? 

const greeting = isLoggedIn ? <Hello /> : null; 

11 / 20

11. Describe what is happening in this code? 

const { name: firstName } = props; 

12 / 20

12. 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; 

  } 

} 

13 / 20

13. What is [e.target.idcalled in this code snippet? 

const handleChange = (e) => { 

  setState((prevState) => ({ ...prevState, [e.target.id]: e.target.value })); 

}; 

14 / 20

14. 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([]); 

  /// ... 

}; 

15 / 20

15. Which below statement is wrong about Controlled Component? 

16 / 20

16. Which below statement is wrong about FLATLIST? 

17 / 20

17. Which below statement is wrong? 

18 / 20

18. What is the process of deciding whether an update is necessary? 

19 / 20

19. What is sent to an Array.map() function? 

20 / 20

20. Which below statement is wrong about React-Native?  

Your score is

The average score is 15%

0%