09 Select the correct statements regarding hooks from the below options. a) Hooks can be used to share state between com
Posted: Fri May 20, 2022 9:54 am
questions...
09 Select the correct statements regarding hooks from the below options. a) Hooks can be used to share state between components b) Hooks can be used to share state changing logic between components c) Hooks enable state management and life cycle management in functional components d) All the above Q10 Match the following: useRef returns a mutable object useReducer accepts state and action as arguments useCallback caches the provided function useMemo caches the provided function result Q11. Identify the properties of NavLink /> component: (multiple select) a) exact b) activeStyle c) activeClassName d) to Q12. Which of the below options is the correct way of writing inline styles for highlighting the active link, using <NavLink /> component? a) activeClassName={active} b) activeStyle={{ background:'white', color: black' }} c) activeClassName="active" d) style={{background:'white', color: black"}} Q13 Consider the below Route configuration:(Assume all the required imports are done) <Switch> <Route path='/ component={Home} > <Route path="/about' component={About} > <Route path="/contact' component={ContactUs} /> <Route path="/view' component={ViewDetails} > <Route path="*" component={NotFound} /> </Switch> Which component will be rendered for the URL http://localhost:3000/view a) View Details b) Both View Details & NotFound component c) None of the component will be rendered d) Home component
React js 09 Select the correct statements regarding hooks from the below options. a) Hooks can be used to share state between components b) Hooks can be used to share state changing logic between components c) Hooks enable state management and life cycle management in functional components d) All the above Q10 Match the following: useRef returns a mutable object useReducer accepts state and action as arguments useCallback caches the provided function useMemo caches the provided function result Q11. Identify the properties of NavLink /> component: (multiple select) a) exact b) activeStyle c) activeClassName d) to Q12. Which of the below options is the correct way of writing inline styles for highlighting the active link, using <NavLink /> component? a) activeClassName={active} b) activeStyle={{ background:'white', color: black' }} c) activeClassName="active" d) style={{background:'white', color: black"}} Q13 Consider the below Route configuration:(Assume all the required imports are done) <Switch> <Route path='/ component={Home} > <Route path="/about' component={About} > <Route path="/contact' component={ContactUs} /> <Route path="/view' component={ViewDetails} > <Route path="*" component={NotFound} /> </Switch> Which component will be rendered for the URL http://localhost:3000/view a) View Details b) Both View Details & NotFound component c) None of the component will be rendered d) Home component