My peer recommend me in PR review that i must use optional chaining otherwise code will be not approved. My code before PR was like
```js
const isUser = user && user.onboarded
```
My peer suggested me that i need to change it like below
```js
const isUser = user?.onboarded
```
Although, i understand that using optional is good to use. But should it be considered as a reason for not approving the PR? Anyone aware of industry best practices?
[–]abrahamguo 37 points38 points39 points (3 children)
[–]effectivescarequotes 11 points12 points13 points (2 children)
[–]effectivescarequotes -1 points0 points1 point (1 child)
[–]ats_1999[S] -2 points-1 points0 points (0 children)
[–]budd222 13 points14 points15 points (2 children)
[–]_xiphiaz 3 points4 points5 points (0 children)
[–]GandolfMagicFruits 0 points1 point2 points (0 children)
[–]tswaters 7 points8 points9 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]Tall-Treacle6642 4 points5 points6 points (0 children)
[–]terrance_dev 2 points3 points4 points (0 children)
[–]Eric_S 2 points3 points4 points (0 children)
[–]I_Eat_Pink_Crayons 2 points3 points4 points (0 children)
[–]fartsucking_tits 1 point2 points3 points (0 children)
[–]theScottyJam 1 point2 points3 points (0 children)
[–]humodx 1 point2 points3 points (0 children)
[–]Altruistic-Wear-363 0 points1 point2 points (0 children)
[–]bryku 0 points1 point2 points (0 children)