Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import axios from 'axios'
- import "./App.css";
- function RedLipColor() {
- const [posts, setPosts] = useState([])
- useEffect(() => {
- axios.get('/redLipColor').then(res =>
- {
- console.log(res)
- setPosts(res.data)
- }).catch(err => { console.log(err)})
- })
- return (
- <div>
- <ul>(
- {posts.map(post => (
- <li key={post.id}>{post.title} </li>
- ))}
- </ul>
- </div>
- )
- }
- export default RedLipColor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement