Rishabh-malhotraa/caucus

Refactor Code for roomID extractions

Rishabh-malhotraa opened this issue · 8 comments

Motivation

I want to adhere to the DRY concept in programming (Don't Repeat Yourself)

Description

In many files, I have resued the logic to extract the param id from the URL. Firstly I thought I wouldn't need it but then I have rewritten the same code in different files several times.

A better implementation would be to use context and store it as a part of the global state

import { useParams } from "react-router-dom";
const { id } = useParams<Record<string, string>>();

Hey @Rishabh-malhotraa , I would like to work on this please.. and please guide me on how can i contribute to this as i'm new here 😅

You should start by setting up the project locally, make the required changes, and make a pull request.
I'll then do a code review on your changes and give you feedback, if needed; and then your PR will be merged to the codebase :).

sure thank you so much

Hey @Rishabh-malhotraa , could i solve this issue

Hi @Rishabh-malhotraa, I have just cloned this repository and after that i installed dependencies, but unfortunately if face to this issue

Can't resolve 'tsparticles' in '/home/manujtiwari/Desktop/portfolio-react/node_modules/react-particles-js/cjs'

I have solved the issue by installing "tsparticles" npm package .
should i commit the change that i have made to this repository

@MarufSharifi Sure go right ahead, make a pr and I'll merge it

I had made pr, please check.

Hey @Rishabh-malhotraa, thanks a lot for helping me, the problem have gone, when i used npm to install packages, because of that i closed the pr and deleted that branch. right now i am working on this issue