Skip to content

Solution#2138

Open
MiniMixer wants to merge 2 commits intomate-academy:masterfrom
MiniMixer:develop
Open

Solution#2138
MiniMixer wants to merge 2 commits intomate-academy:masterfrom
MiniMixer:develop

Conversation

@MiniMixer
Copy link

Copy link

@Anton-Kuchmasov Anton-Kuchmasov 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!

Would you mind to create enum for ErrorMessage too?

Check out comment below

src/App.tsx Outdated
export const App: React.FC = () => {
const [todosFromServer, setTodosFromServer] = useState<Todo[]>([]);
const [tempTodo, setTempTodo] = useState<Todo | null>(null);
const [errorMessage, setErrorMessage] = useState('');

Choose a reason for hiding this comment

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

Consider creating custom type / enum for all possible error states to avoid hard-coded typos

Copy link

@vitalii-bondarenko-ua vitalii-bondarenko-ua left a comment

Choose a reason for hiding this comment

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

Looks good

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