---
# System prepended metadata

title: ROUTING SPREADING AND DESTRUCTURING IN REACT.

---

# ROUTING SPREADING AND DESTRUCTING IN REACT.

1. DESTRUCTING:- is a feature inherited from javascript ES6, allows for the extraction of values from arrays or properties from objects distinct variables. it also lets you extract values from objects or arrays and assign them to variables in a clean, concise way.
* array destructing:- uses square brackets [] to unpack values from an array.
* object destructing:- uses curly braces {} to extract properties from an object.
*benefits of destructing*
i. readability
ii. conciseness
iii. flexibility
iv. efficiently

2. Spreading:-  spread operator (...) in React is used to expand the elements of an array or the properties of an object into separate elements or key-value pairs. the spread operator can be used to pass objects such as props without the need to pass individual values

3. Routing:- Routing determines what content or pages to display when a user visits a particular URL. You need to set up a router to map URLs to different parts of your app routing is used for big applications where you need to connect and move from pages to pages so with the help of routing our page would be more efficent and faster unlike using the anchor tag in our html in react we use routing.

