Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229923

How to pass updated user name from edit profile page to app component's side menu?

$
0
0

Two relatively minor notes:

Comments are a mixed blessing. What’s much better is self-documenting code, which includes naming conventions. When I see a bare user, I instantly assume “that’s a lexically-scoped variable”. Having that name potentially collide with a type of the name user is confusing. So types should always start with a capital letter (PascalCase).

Secondly, since you already bothered to define a User type, that’s great. Use it. profile: User, not profile: any. any totally nerfs much of the value in using TypeScript in the first place. You virtually never need it in your own code - it’s generally most needed when writing libraries.


Viewing all articles
Browse latest Browse all 229923

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>