Open gomorizsolt opened 4 years ago
Feel free to do these small refactors when you notice them.
https://github.com/zeit/next.js/releases/tag/v9.2.0
Use optional chaining syntax: #9975
Cool! The underlying framework supports the optional chaining operator out of the box. My gut feeling, though, is that we must tweak the linter config to make it work.
(1) Instead of inline if conditions: https://github.com/c-hive/dotdev/blob/e1fd40f11bbdad8f8bb44a5ecb06b170236108a3/src/components/Header/Header.js#L39
Use the
&&
operator consistently(IIRC we already discussed this):(2) Instead of
&&
to ensure object fields: https://github.com/c-hive/dotdev/blob/e1fd40f11bbdad8f8bb44a5ecb06b170236108a3/src/components/Header/Header.js#L42Use the optional chaining operator:
We may also find further improvements.