diff --git a/main.js b/main.js new file mode 100644 index 0000000..616a152 --- /dev/null +++ b/main.js @@ -0,0 +1,59 @@ +import React from 'React'; +import React-Dom from 'React-DOM'; +import axios from 'axios'; + +export class main extends React.COMPONENT{ + constructor(super){ + this.state : { + searchText: '', + data : [], + user : '' + } + + handleChange(){ + var searchText = document.getElementByClassNames('Search')[0].value; + if(searchText.length>3){ + var url = "https://api.github.com/search/users?q="+searchText; + axios.get(url) + .then(response){ + for(var i=0;i +

Search,Auto-Complete & Details of Github users

+ +
+

{this.state.dataJson.API}

+

{this.state.dataJson.Key}

+
+

{this.state.dataJson.AvatarImage}

+

{this.state.dataJson.Type}

+

{this.state.dataJson.Repos}

+

{this.state.dataJson.Followers}

+
+
+ + + ) + }