GithubHelp home page GithubHelp logo

andrii-hryhoruk / react_dynamic-list-of-posts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mate-academy/react_dynamic-list-of-posts

0.0 0.0 0.0 228 KB

JavaScript 2.62% HTML 2.89% SCSS 42.43% TypeScript 52.07%

react_dynamic-list-of-posts's Introduction

React dynamic list of Posts

Task

You are given a basic markup and the API.

Implement the app to manage post comments.

Don't use class components. Use React Hooks instead.

  1. Create an /src/api/posts.ts and add a method getUserPosts(userId) there
  2. Load posts and show them using the PostsList on page load. (use useEffect as a componentDidMount)
  3. Implement the UserSelect to show only the posts of the selected user. (call getUserPosts each time when user changes)
  4. Each post has an Open button that sets a selectedPostId in the App.
  5. After opening the details the Open button becomes Close and will close the details onclick.
  6. PostDetails component should be shown only after selecting a post.
  7. Create getPostDetails(postId) method in /src/api/posts.ts and load post details from /posts/:postId
  8. Create getPostComments(postId) method in /src/api/comments.ts, load comments from /comments and filter them using a given postId
  9. Add a button to show/hide comments.
  10. Add an X button near each comment to delete it on the server.
  11. Add a form to add a new comment to the current post
  12. Comments should be immediately updated after adding or removing.

react_dynamic-list-of-posts's People

Contributors

mgrinko avatar mykola-yarchuk avatar danmysak avatar varseniuk avatar danheim avatar vpolets avatar irenhh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.