<button
onClick={() => handleFilter(btn.key)}
className={ classnames('shadow-none', 'btn', 'btn-outline-primary', { active: activeBtn === btn.key }) }
>
{btn.name}
</button>
new Date().getTime();
i18n:
months: An array of month names. 0 == January, 12 == December, etc.
weekdays: An array of weekday names. 0 == Sunday, 1 == Monday, etc.
time: An array of labels for the time picker. The first, for non-ranged time pickers. The second, for the starting time. And the third, for the ending time.
User {
_id: ObjectId('...'),
notes: [
ObjectId('Note1...'),
ObjectId('Note2...'),
ObjectId('Note3...')
]
}
Note {
_id: ObjectId('Note1...'),
...,
labels: [
ObjectId('Label 1'),
ObjectId('Label 2'),
]
}
Label {
_id: ObjectId('Label 1'),
name: "Label 1"
}
const Render = () => (
<Route path="/daily/:coord" component={ SuperComponent } />
)
const SuperComponent = ({ match }) => {
let [ data, setData ] = useState( null );
let coord = match.params.coord;
useEffect( () => {
setData( hundlerURLRequest( coord ) );
}, [hundlerURLRequest, setData, coord ]);
return <DailyWeather coords={data} />
}
function removeItem(id){
return function(e){
...
}
}
render = () => {
const { removeItem, id } = this.props;
return(
<button onClick={removeItem(id)}> Remove item </button>
)
}