0% found this document useful (0 votes)
13 views

Q. React

Uploaded by

italimbd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Q. React

Uploaded by

italimbd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

React Question:

1. useState কেন ইউস করি, এটার কাজ কি?

2. Chilld থেকে Parents এ ডাটা পাস করা যায় কিনা?

3. Parant থেকে ৪-৫ নিচের চাইল্ড ডাটা পাস করার বেস্ট ওয়ে কোনটা?

4. রিয়েক্ট এর সাথ Mongodb কেন ইউস করা হয়ছে MySql কেন নয়?

5. What is reactjs

6. Reactjs disadvantage.

7. What is Redux and uses?

8. React native সম্পর্কে কি জানো বলো

9. Higher order components কি? বাস্তব উদাহার দাও।

10. UseEffect and useState কি return করে

11. React lifecycle সম্পর্কে বলো

12. Props and state কীভাবে কাজ করে

13. রিয়েক্ট আমরা কেন ব্যাবহার করব

14. রিয়েক্ট অপ্টমাইজ কীভাবে করে

15. রিয়েক্ট এর স্টেড ম্যানেজমেন্ট জিনিস্টা কি

16. Jsx কীভাবে কাজ করে.

17. Redux -flax কি?

18. Virtual dom and real dom এর পার্থক্য কি?

19. UseEfect এর ডিপেন্ডেন্সি কেন ইউস করা হয়

20. What is context API? How does it work?

21. Props drailng কি?

22. React native এর Elementor and component নিয়ে কাজ করছে কিনা

23. React re-render কীভাবে ঠেকানো যায়

24. useHistory কেন ইউস করা হয়?

1. We use `useState` in React to create state variables within functional components. Its job is
to manage stateful logic in React components.
2. Yes, data can be passed from child to parent in React using callback functions. The child
component can invoke a callback function passed down from the parent, thereby passing data
back to the parent.

3. The best way to pass data from a parent component to its 4th or 5th child component would
be to use either props drilling or context API, depending on the complexity of the application
and the desired level of encapsulation.

4. React is often used with MongoDB due to the flexibility of both technologies in handling
JavaScript-based applications and data structures. However, React can also be used with
MySQL or any other database through appropriate backend integration.

5. ReactJS is a JavaScript library for building user interfaces. It allows developers to create
reusable UI components and efficiently update the UI in response to changes in data.

6. One disadvantage of ReactJS is its steep learning curve, especially for beginners. Managing
state and understanding component lifecycle can be challenging for newcomers.

7. Redux is a predictable state container for JavaScript applications, primarily used with React
for managing application state. It provides a centralized store and predictable state mutations
through reducers, making state management easier in large applications.

8. React Native is a framework for building native applications using React. It allows
developers to write mobile applications using JavaScript and React, targeting both iOS and
Android platforms.

9. Higher-order components (HOCs) are functions that take a component and return a new
component with enhanced functionality. They are used for code reuse, logic abstraction, and
adding additional features to components. An example would be a `withAuthentication` HOC
that adds authentication logic to a component.

10. `useEffect` returns a cleanup function, while `useState` returns the current state value and
a function to update that state.
11. The React component lifecycle refers to the various stages a component goes through from
initialization to destruction. These stages include mounting, updating, and unmounting, each
with corresponding lifecycle methods like `componentDidMount`, `componentDidUpdate`,
and `componentWillUnmount`.

12. Props are used to pass data from parent to child components, while state is used for
managing component-specific data that can change over time. Props are immutable, whereas
state is mutable and managed internally by the component.

13. We use React for building user interfaces because it offers a component-based
architecture, virtual DOM for efficient updates, and a declarative syntax for describing UI
components.

14. React optimization techniques include using shouldComponentUpdate or React.memo for


preventing unnecessary re-renders, optimizing component rendering with useMemo and
useCallback hooks, and implementing code splitting and lazy loading for optimizing
performance.

15. State management in React involves managing the state of components and sharing data
between them. It includes techniques like lifting state up, using context API, or using state
management libraries like Redux.

16. JSX is a syntax extension for JavaScript that allows writing HTML-like code within
JavaScript. It gets transformed into regular JavaScript function calls, making it easier to write
React components.

17. Redux-Flux is a pattern inspired by Redux for managing application state in a predictable
manner. It involves unidirectional data flow and the use of actions and reducers to update the
state.

18. The virtual DOM is a lightweight copy of the real DOM maintained by React. React updates
the virtual DOM first and then efficiently applies the difference to the real DOM, minimizing
DOM manipulation and improving performance.

19. `useEffect` dependencies are used to specify which values should trigger re-execution of
the effect when they change. It helps in avoiding unnecessary re-execution of effects and
ensures that effects are executed only when needed.

20. Context API is a feature in React for managing global state without having to pass props
through intermediate components. It provides a way to share data between components
without explicitly passing props through every level of the component tree.

21. Props drilling refers to the process of passing props down multiple levels of nested
components in order to access them in deeply nested child components. It can lead to prop
clutter and reduced component encapsulation.

22. React Native works with components similar to React, but it uses native components for
rendering UI elements on mobile devices. It doesn't use HTML elements like React does.

23. React re-renders components when their state or props change. To optimize re-renders,
you can use techniques like shouldComponentUpdate, PureComponent, or React.memo to
prevent unnecessary re-renders.

24. `useHistory` hook is used in React Router for accessing the browser history. It allows you
to programmatically navigate to different routes and manipulate the browser history stack
within your React components.

You might also like