No matter how cool the logic is, It is always a good idea to follow a consistent formatting.
I know fiddling with indentation sucks, that is why we have a tool called prettier, which takes care of formatting for you. I strongly suggest you use that.
Side note: Why do you need to define formatDate inside the react component ?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article Sai!
One humble suggestion, 'please format your code'. At first glance I couldn't understand what was going on as your code looks like this
No matter how cool the logic is, It is always a good idea to follow a consistent formatting.
I know fiddling with indentation sucks, that is why we have a tool called prettier, which takes care of formatting for you. I strongly suggest you use that.
Side note: Why do you need to define
formatDate
inside the react component ?