I was just reading the JSX in depth react docs facebook.github.io/react/docs/jsx-in-depth.html and confirmed that you couldn't do something like put curly braces around components[props.storyType] from the example there.
I was curious if anyone has an idea what the reasoning was that led React developers to ensure that React elements can't be an expression? After all props can be determined via an expression. Was it because of a performance concern?
j
stuff ;)
I think because of the declarative nature and explicit nature. as soon as you make dynamic expressions you loose readability. But that's just my opinion ofc.