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

2 / 20

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

  } 

} 

3 / 20

3. Which below statement is wrong about FLATLIST? 

4 / 20

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

function Dish() { 

  return ( 

    <> 

      <Ingredient /> 

      <Ingredient /> 

    </> 

 ); 

} 

5 / 20

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

const handleChange = (e) => { 

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

}; 

6 / 20

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

7 / 20

7. Which below statement is correct about Props? 

8 / 20

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

  /// ... 

}; 

9 / 20

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

}; 

10 / 20

10. Disadvantage of React-Native? 

11 / 20

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

12 / 20

12. Which below statement is wrong about Controlled Component? 

13 / 20

13. In which lifecycle method do you make requests for data in a class component? 

14 / 20

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

15 / 20

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

16 / 20

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

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

17 / 20

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

function MyComponent(props) { 

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

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

} 

18 / 20

18. Which below statement is wrong? 

19 / 20

19. Describe what is happening in this code? 

const { name: firstName } = props; 

20 / 20

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

useEffect(() => { 

  setName('shiv'); 

}, [name]); 

Your score is

The average score is 15%

0%