Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #1491

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Develop #1491

wants to merge 3 commits into from

Conversation

vikshiyan
Copy link

Copy link

@Svidruk Svidruk left a comment

Choose a reason for hiding this comment

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

Very nice !

Copy link

@igorkruz igorkruz left a comment

Choose a reason for hiding this comment

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

Good Job 👍
let's improve your solution

Review the attached video and fix the bug.
https://www.loom.com/share/ddbab52f666943d7a3fc6aa58c05105f

Comment on lines +83 to +86
todoFromService
.getTodos()
.then(setTodos)
.catch(() => setErrorMessage(TypeError.LOADING));

Choose a reason for hiding this comment

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

It's better to move the logic inside the useEffect hook to a separate function, as it improves code readability, reusability, and makes testing easier. It also helps keep useEffect focused on side effects.

setErrorMessage: React.Dispatch<React.SetStateAction<TypeError>>;
};

export const Error: React.FC<Props> = ({ errorMessage, setErrorMessage }) => {

Choose a reason for hiding this comment

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

Suggested change
export const Error: React.FC<Props> = ({ errorMessage, setErrorMessage }) => {
export const Error: FC<Props> = ({ errorMessage, setErrorMessage }) => {

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.

3 participants