iamshaunjp / iamshaunjp/Complete-React-Tutorial
Redirect to the created post
Open
- Dominant language
- No language data
- Stars
- 2k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Hi! If you want to go directly to the created post, you need to do the next thing:
Привiт! Якщо ви хочете відразу перейти в щойно створений пост, вам потрібно зробити наступне:
fetch('http://localhost:8000/blogs',{
method: 'POST',
headers:{"Content-Type":"application/json"},
body: JSON.stringify(blog)
})
.then(response =>{return response})
.then(response => response.json())
.then((response) => history.push('/blogs/' + response.id))
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.