I am reading this and it says:
When a component is purely a result of props alone, no state, the component can be written as a pure function avoiding the need to create a React component instance.
What's the difference between a component and a component instance ?
Are they the same ?
EDIT:
What is the difference between
Component
andComponent Instance
?How do they relate to each-other ?
Conceptually ?
How are they represented in computer memory? How does the representation differ ?
What is a component and what is an instance of that component ? (In memory.) What kind of JS Object ?
Instance in what sense ? Object oriented sense ?
Is it true that every component can have (one or more) instance(s) ?
How many instances can a component have ?
Does it even make sense to say that an instance can be created for a/every react component ?
How are react component instances created and how are components created ?
Reason for asking:
I am trying to create a concept map of react to clarify the terminology and how they relate to each other.
Here is a draft:
componentDidMount
andcomponentWillReceiveProps
; it literally just renders whatever props you pass it. If you create aclass
that extendsReact.Component
, you've now created a stateful component that has access to lifecycle events. – lux