Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link components #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions app/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Main from "./components/main.js";

const appRoot = document.getElementById('app');
const App = (props) => <p>Hello World</p>;
// const App = (props) => <p>Here is where the container goes</p>;

ReactDOM.render(<App/>, appRoot);
ReactDOM.render(<Main/>, appRoot);
1 change: 1 addition & 0 deletions app/components/follower-repo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// here is where the elements that show number of followers and repos goes
1 change: 1 addition & 0 deletions app/components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//client js to make api calls
15 changes: 15 additions & 0 deletions app/components/listContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { Component } from "react";
import ListItem from './listItem';



const Profiles = (props) => {
return (
<div>
<ListItem />
</div>
)
}


export default Profiles;
11 changes: 11 additions & 0 deletions app/components/listItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

const ListItem = () => {
// Rendering an li tag with props.children between the tags (grocery text)
return (
<h1>whatever im a profile thing</h1>
);
};

// Exporting this component as the default (only) export
export default ListItem;
28 changes: 28 additions & 0 deletions app/components/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Include React
import React, { Component } from "react";
import ListContainer from './ListContainer';


// here is where the header and input box go
class Main extends Component {
constructor() {
super();
this.state = {
// put the values returned by the input box here;
};
// We need to bind our handleInput method to our component with this syntax in the constructor since we'll be passing it to child components
// this.handleInput = this.handleInput.bind(this);
}
// handleInput(e){
//
// }
render() {
return(
<div>
<h1>GitHubster</h1>
<ListContainer/>
</div>
);
}
}
export default Main;
1 change: 1 addition & 0 deletions app/components/student.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// here is where the photo and Name of the student goes