My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Is it expensive to store React components in variables?

Aron's photo
Aron
·May 7, 2016

I have basic knowledge of JavaScript. Currently, working in a ReactJS project in which developers have assigned ReactJS component to a variable as following:

formComponent = (
  <Component1
    propOne={...}
  />
)

Is it the right way to do? How expensive it is?