Skip to content

Conversation

@Anurag-NURA
Copy link

Created the dark mode feature for the component

"dependencies": {
"clsx": "^1.2.1"
"clsx": "^1.2.1",
"react-todo-component": "^2.0.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove react-todo-component dependency

setItems([...updatedItems, ...completedItems]);
};

const [theme, setTheme] = useState("light-theme");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As people will use react-todo as an external dependency. Can you expose a prop to control the theme? instead of using local state. Just make light-theme default value for the prop.

Copy link
Author

@Anurag-NURA Anurag-NURA Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not so sure how to create a prop that can be later used as optional feature. As I am very new in react, I only know Javascript, I don't have idea about Typescript. But I will let you know if I am able to make a prop for the feature.

use-latest "^1.0.0"

react-todo-component@^2.0.3:
version "2.0.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed react-todo-component.

@bhujoshi
Copy link
Contributor

@Anurag-NURA thanks. I have added a few review comments please have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants