Skip to content

Instantly share code, notes, and snippets.

Avatar

Clarian 01Clarian

  • NFTuity
  • New York
View GitHub Profile
@01Clarian
01Clarian / Weather.js
Created Nov 16, 2019
Building Weathe.js Component
View Weather.js
import React from 'react'
const Weather = ({description, city, country, error, temperature}) => {
return (
<div>
{city && country && <p>{city}, {country}</p>}
{temperature && <p>{temperature}</p>}
{description && <p> {description}</p>}
{error && <p>{error}</p>}
</div>
@01Clarian
01Clarian / Form.js
Created Nov 16, 2019
Building Form For Hooks Weather App
View Form.js
import React from 'react'
const Form = (props) => {
return (
<form onSubmit={props.getWeather}>
<input
type='text'
placeholder='city'
name='city'
/>
View Form.js
import React from 'react'
const Form = (props) => {
return (
<form onSubmit={props.getWeather}>
<input
type='text'
placeholder='city'
name='city'
/>