Rinakat225 / Todo-list

0 stars 0 forks source link

Remove duplicated ternary operator #10

Closed kresimir-coko closed 2 months ago

kresimir-coko commented 2 months ago

https://github.com/Rinakat225/Todo-list/blob/9425613facb42840182d01162eea3856be179630/src/App.js#L109-L118

Rendering empty strings as a fallback is an anti-pattern, rather use && and use a different technique to render a fallback, maybe a sanity check before the main return that returns an empty fragment

Rinakat225 commented 2 months ago

Done on commit: https://github.com/Rinakat225/Todo-list/commit/3931dc3578d7f9adbb5c8ac6d62fd3d6dffb975f