MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/node/comments/jrau9t/conditionally_call_a_function_with_optional/gbsb579/?context=3
r/node • u/wobsoriano • Nov 10 '20
126 comments sorted by
View all comments
26
I think the latter solution is very readable and clear. This will be a very useful feature in React.
4 u/Guisseppi Nov 10 '20 Node has to wait for the V8 implementation, you can add this babel plugin and use it on the frontend now: https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining 3 u/[deleted] Nov 10 '20 Thanks, we will be waiting then! 3 u/[deleted] Nov 10 '20 CRA already has this babel plugin so you can use optional chaining right now.
4
Node has to wait for the V8 implementation, you can add this babel plugin and use it on the frontend now: https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining
3 u/[deleted] Nov 10 '20 Thanks, we will be waiting then! 3 u/[deleted] Nov 10 '20 CRA already has this babel plugin so you can use optional chaining right now.
3
Thanks, we will be waiting then!
3 u/[deleted] Nov 10 '20 CRA already has this babel plugin so you can use optional chaining right now.
CRA already has this babel plugin so you can use optional chaining right now.
26
u/[deleted] Nov 10 '20
I think the latter solution is very readable and clear. This will be a very useful feature in React.