Closed cfilby closed 7 years ago
Should now also address #16.
I updated editorStore.setArticleSlug to reset the form state if a new article slug is set (this could also be moved to loadInitialData as well or just be a direct call in Editor), and changed componentWillReceiveProps to componentDidUpdate since the React Docs indicate that this is a good place to kick off the network requests. I can also revise this if we want the synchronous portion of setting the article slug in componentWillReceiveProps.
Thanks @cfilby!
References #15
This change updates to the router to use a single Editor route entry with an optional parameter (
/editor/:slug?
). It also corrects a typo in the nextProps.match.params access. These two changes restored the 'article editing' functionality for my locally running instance.Please let me know if there's anything that needs changing.