Skip to content

Instantly share code, notes, and snippets.

import React, { Component } from 'react';
import {Button, Form, FormGroup, FormControl, Navbar, Nav, NavItem} from 'react-bootstrap';
class MyNavbar extends Component {
constructor(){
super();
this.state={
value: ""
}
this.handleChange = this.handleChange.bind(this);
import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import '../css/Home.css';
import {Button, FormGroup, FormControl} from 'react-bootstrap';
class Home extends Component {
render() {
return (
<div className="Home">
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
import Home from './components/home';
// Importing React Router libraries
import { Router, Route, browserHistory, IndexRoute } from 'react-router';
ReactDOM.render(
import React, { Component } from 'react';
import {Button, Form, FormGroup, FormControl, Navbar, Nav, NavItem} from 'react-bootstrap';
class MyNavbar extends Component {
render() {
return (
<Navbar className="MyNav">
<Navbar.Header>
<Navbar.Brand>
import axios from 'axios';
const dailyWeather = "http://api.openweathermap.org/data/2.5/weather?q="
const tail = "&APPID=*****YOUR API*********"
const fiveDayWeather = "http://api.openweathermap.org/data/2.5/forecast/daily?q="
const fiveDayTail = "&cnt=5"
.Home {
position: fixed;
left: 0;
width: 100%;
height: 100%;
background-repeat:no-repeat;
background-size:100%;
background-position:fill;
background-image: url(https://static.pexels.com/photos/50721/pencils-crayons-colourful-rainbow-50721.jpeg);
text-align: center;
@Louiefigz
Louiefigz / react-comments-lab-css
Created April 29, 2017 22:00
styling for comment box code for react comments lab.
body {
margin: 0;
padding: 0;
font-family: sans-serif;
background:#E6EEF6;
}
.wrap{
margin-left:20px;
}
class RegistrationForm extends React.Component {
render() {
return (
<form>
<label>Username</label>
<input type="text" />
<label>Password</label>
<input type="password" />
<button type="submit">Register</button>
</form>
function Sandwich(bread, ingredients, name) {
this.bread = bread;
this.ingredients = ingredients;
this.name = name;
}
function serve(customer) {
// From the variable gc, we have access to this.name
console.log("Hey " + customer + ", here's your " + this.name + ", enjoy!");
}
function Sandwich(bread, ingredients, name) {
this.bread = bread;
this.ingredients = ingredients;
this.name = name;
}
function serve() {
console.log("here's your " + this.name + ", enjoy!");
}