- Build a demo version of the Reddit feed. It should show a list of posts with a search bar that can filter the posts by title. Posts should show a title, body, subreddit name, and vote count.
- Use this dummy data api to fetch posts, treating the first "tag" on the post as the subreddit name.
- Use either vanilla React or Next.js, but use Typescript either way.
- Use vanilla CSS, TailwindCSS, or the Ant framework for styling. You can either try to match Reddit's design, or do your own take on it.
Initialize a Next.js project with default options:
npx create-next-app@latestFor styling, add Ant and configure for App Router as instructed.
npm install --save antd @ant-design/cssinjs @ant-design/iconsAdd the useMediaQuery hook to adjust to different screen sizes.
npm install --save usehooks-tsAdd infinite scroll.
npm install --save react-infinite-scroll-componentAdd testing dependencies and configure Jest according to the docs.
npm install --save-dev jest jest-environment-jsdom @testing-library/react @testing-library/jest-dom whatwg-fetchRun a development server on localhost:3000.
npm run devRun tests.
npm run testI use Vercel for automatic deployments from GitHub to rebbit-drab.vercel.app.