-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreact.jsx
More file actions
41 lines (35 loc) · 993 Bytes
/
react.jsx
File metadata and controls
41 lines (35 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Create UI for JobOffers List.
// use https://example/api.com/offers as the REST API endpoint
// It returns a JSON array of job offers like
const jobOffers = [
{
id: 1,
title: "Frontend Developer",
location: "Texas, USA",
salary: "$100000",
skills: ["JavaScript", "React", "CSS"],
},
]
// and fetch the data using useEffect.
// Display the data in an ordered list format.
// Ordered List contains items with id, title, location, salary, and skills.
// If no job offers are found, display "No job offers found" and minimize the client size. (lazy loading)
// Use React functional components and hooks.
// Split the component into smaller components.
import React, { useEffect, useState, useLayoutEffect } from 'react';
const JobOfferList = () => {
return (
<div>
TODO
</div>
);
}
const JobOfferListItem = () => {
return (
<div>
TODO
User can check an item
User can add a comment to an item (use <input)
</div>
);
}