Can someone helps me in understanding wether this will be classified as instance.
So if i got the general definition correct, This would an instance be an instance of a function in javascript
function Person(first, last, age, eye) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eye;
}
//Creating an instance
var myFather = new Person("John", "Doe", 50, "blue");
Now In react, Consider our App.js file in React
import React, { Component } from "react";
import Ccockpit from "../components/cockpit/cockpit.js";
class App extends Component {
//State
//All the handlers
//Render
render() {
return (
<Ccockpit
coatiitle={this.props.title}
cocPersonState={this.state.showPerson}
cocperson={this.state.person.length}
toggler={this.togglerPersonHandler}
login={this.loginHandler}
>
{person}
</Ccockpit>
);
}
}
Here will <Ccockpit
be considered as instance of our App?