SirFreeman avatar

Update on KnackSteem Development

sirfreeman

Published: 14 Dec 2018 › Updated: 14 Dec 2018Update on KnackSteem Development

Update on KnackSteem Development

Repository

https://github.com/knacksteem/knacksteem.org

Pull Request

https://github.com/knacksteem/knacksteem.org/pull/65

About knacksteem.org

"Do you have any talent? If yes! then KnackSteem is for you."
"Rewards people with talents, it can be any talent, anything you know how to do best is highly welcome on the platform."

Changes / New Features

  • Implement edit function for articles and comments.
  • Implement reply to articles/comments.

Details

In the articleDetail component, which shows a particular post, When the buttons edit and reply are clicked, the state in the article is changed and set to isReply true and if it is a comment, the state property isComment would be set to true and the editor is showed . Next we check if the editor is receiving props in the componentWillReceieveProps life cycle event and set the value of the articleData being passed to the editor component as the next props. In the componentDidMount we set the value of the editor to the new prop passed in then we can edit the value in the onChange Event.

componentDidMount() {
   ..........................
    const {articleData, isEdit, isComment} = this.props;
    if(isEdit){
      this.setValues(articleData);
    }
    
    if (isComment && isEdit)
    {
      this.setValues(articleData)
    }
  }

What's next?

Adding a app side bar for mobile mode.

commits

https://github.com/knacksteem/knacksteem.org/pull/65/commits/4658b085096fd20994ea80df6bca75121d588dd9
https://github.com/knacksteem/knacksteem.org/pull/65/commits/daae02d695134c5aa40a334eaf754e582f47e536
https://github.com/knacksteem/knacksteem.org/pull/65/commits/e81ffddda3838e7e51274942d647aed90ebae34a

Repo

https://github.com/ogbiyoyosky

Same thing happens in the editing of comment, we just need to know if comment is the props passed in. We can dispatch actions for either posting or editing.

Leave Update on KnackSteem Development to:

Written by

Am a Biochemical technologist, also a full stack developer. I love laravel, the lucid architecture guy.

Read more #utopian-io posts


Best Posts From SirFreeman

We have not curated any of sirfreeman's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From SirFreeman