Coder Social home page Coder Social logo

interactive-comments-section-fm's Introduction

Frontend Mentor - Interactive comments section solution

This is a solution to the Interactive comments section challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

How to start

To start the project, you need to install the dependencies with the command yarn or npm install and You can also start the fake API with the command yarn api or npm run api. The fake API will start on the port 5000. After that, you can start the project with the command yarn start or npm start. The project will start on the port 3000.

The challenge

Users should be able to:

  • View the optimal layout for the app depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Create, Read, Update, and Delete comments and replies
  • Upvote and downvote comments
  • Bonus: If you're building a purely front-end project, use localStorage to save the current state in the browser that persists when the browser is refreshed.
  • Bonus: Instead of using the createdAt strings from the data.json file, try using timestamps and dynamically track the time since the comment or reply was posted.

Screenshot

Links

My process

Built with

What I learned

I learned how to use the useQuery and useMutation hooks from TanStack Query, and also how to use the useMedia hook from react-use to verify media query and add styles for media specify. I also learned how to use the json-server to create a fake API for the project. also learned how to use the date-fns to format the date. and how to use shadcn/ui to create a beautiful UI.

Continued development

I want to continue learning about the use of the useQuery and useMutation hooks from TanStack Query, and also the use some editor WYSIWYG for the comment and reply input. i also want to learn testing my application with vitest and React Testing Library.

Note: Delete this note and the content within this section and replace with your own plans for continued development.

Useful resources

interactive-comments-section-fm's People

Contributors

lucas-sk avatar

Watchers

 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.