See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| <div class="top" title="Наверх"><i class="fa fa-angle-double-up"></i></div> | |
| .top | |
| position: fixed | |
| bottom: 25px | |
| background-color: #E0E0E0 | |
| border-radius: 10em | |
| color: #666 | |
| font-size: 26px | |
| width: 50px |
In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.
Here's one way to set it up:
npm init -y in your project folder (don't skip this step!)npm install terserNow, to minify a file called like_button.js, run in the terminal:
| import React, { useState, useEffect } from 'react' | |
| import { useDebounce } from './use-debounce' | |
| const MySearchComponent = props => { | |
| const [search, setSearch, { | |
| signal, | |
| debouncing | |
| }] = useDebounce('') | |
| const [results, setResults] = useState([]) |
| type ResponseWithData = Response & { data?: any }; | |
| interface Fetcher { | |
| run(input: RequestInfo, init?: RequestInit): Promise<ResponseWithData>; | |
| } | |
| class BasicFetcher implements Fetcher { | |
| async run(input: RequestInfo, init?: RequestInit): Promise<ResponseWithData> { | |
| return await fetch(input, init); | |
| } |