MCPcopy Create free account
hub / github.com/codemistic/Web-Development / constructor

Function constructor

react-NewsMonkey/src/components/News.js:14–26  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

12 }
13
14 constructor(props)
15 {
16 super(props);
17 console.log("I am the constructor from news component");
18 this.state={
19 articles: [],
20 loading:false, //It is used to add spinner when the webpage is buffering
21 page: 1
22 }
23 var text=this.props.category;
24 var a=text.toUpperCase();
25 document.title= `${a}- NewsMonkey`;
26 }
27
28 //componentDidMount always runs after render method
29async componentDidMount(){

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected