adamtang5/journium_render

Thunk async issue

Closed this issue · 1 comments

After creating new story, API route JSON response has the object with story.id, but I'm not able to grab story.id because story is undefined.

Thunk is async. Used .then((data) => history.push(/stories/${data.id})) to grab story.id