LovingBrother / cloneDay11

This is my clone of netflix web app during my software development bootcamp at AfriEd, taught by StackTrek
0 stars 0 forks source link

Implement Data Display Using JavaScript Array #2

Open jdregalario-stacktrek opened 1 year ago

jdregalario-stacktrek commented 1 year ago

Your task is to implement data display functionality using JavaScript arrays in the project. This will help you understand how to structure data, import it into components, and render it in a user interface.

Action Item:

In the src directory of the project, create a new JavaScript file named data.js. This file will serve as a source of data for your application. Inside data.js, define an array of objects.

Example below: Each object should have properties like id, name, price, and any other relevant information. Here's an example of how the data.js file might look:

   const products = [
     { id: 1, name: 'Product A', price: 19.99 },
     { id: 2, name: 'Product B', price: 29.99 },
     // Add more products as needed
   ];

   export default products;

Identify the appropriate component where you want to display the product data. This could be a component like ProductListComponent. Inside this component's file, import the products array from the data.js file you created earlier. You can use JavaScript's import statement for this purpose.

jdregalario-stacktrek commented 1 year ago

Additional Guidelines:

Make sure to follow best practices for JavaScript and React coding, including appropriate component organization and separation of concerns. If you encounter any issues or have questions, feel free to ask for help by commenting on this issue. This task is designed to help you grasp the concept of data management in a React application using JavaScript arrays.

jdregalario-stacktrek commented 1 year ago

@LovingBrother