Conversation
Notices
-
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 25-May-2023 09:57:20 JST Alex Gleason MLM for men. -
Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Thursday, 25-May-2023 10:12:42 JST Alex Gleason @curtis I prefer function whenever possible, because I think it makes the code easier to read, and it improves docs generated by TSDoc.
However, functions can’t be assigned to a type in TypeScript. If you’re writing a lot of functions that need to share the same type (eg React components, HTTP controllers, policy plugins), you have no choice but to use const. For example, const Account: React.FC<IAccount> = (props) => ... There’s no equivalent way to write that with the function syntax.
-
Embed this notice
Curtis Rock, SkD (curtis@social.teci.world)'s status on Thursday, 25-May-2023 10:12:43 JST Curtis Rock, SkD @alex Hey ChatGPT, const or function?
-
Embed this notice
mittimithai (mittimithai@neenster.org)'s status on Thursday, 25-May-2023 10:18:38 JST mittimithai all materials written by chatgpt Alex Gleason likes this.
-
Embed this notice