A downside of enum solution is all the component will be compiled even it doesn't need to rendered
So, we have to compromise on performance to get clean code?
Not really. Check what Luke have shared!
Hmm... Makes sense... Nice article!
We can use enums more creatively and achieve performance as well. Luke have shown a really good example for that below.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
A downside of enum solution is all the component will be compiled even it doesn't need to rendered
So, we have to compromise on performance to get clean code?
Not really. Check what Luke have shared!
Hmm... Makes sense... Nice article!
We can use enums more creatively and achieve performance as well. Luke have shown a really good example for that below.