@Component({
selector: 'app-test',
templateUrl: './app-test.component.html',
styleUrls: ['./app-test.component.scss']
})
export class Test {
constructor(element: ElementRef<HTMLElement>) {
const tagName = element.nativeElement.tagName.toLowerCase();
}
}
useEffect(() => { вызов dispatch }, [])
The dispatch function reference will be stable as long as the same store instance is being passed to the . Normally, that store instance never changes in an application.
However, the React hooks lint rules do not know that dispatch should be stable, and will warn that the dispatch variable should be added to dependency arrays for useEffect and useCallback. The simplest solution is to do just that:
const step = 5;
const c = [];
for (let x = 0, y = 0; x <= a.length; x += step, y += 1) {
c.push(...a.slice(x - step, x).concat(b[y]));
}
window.open("https://qna.habr.com/q/979839", "question", "resizable,scrollbars,status")
Object.values(obj).sort((a, b) => a.start.localeCompare(b.start))
`${valutes.map(element => {
return `<div value="USD">${element}</div>`
})}`
$(function()
$(document).ready(function() { ... });
(function($) {
.......
})
(jQuery);
function hello() {
console.log("HELLO WORLD")
}
hello();
(function() {
console.log("HELLO WORLD")
})()
document.addEventListener("click", (e) => {
let currentId = "";
if (e.target.classList.value === "playing-field-item") {
currentId = e.target.id;
}
console.log(currentId);
})
{{ authFormGroup.controls.login.errors?.minlength.requiredLength }}
import './ejs/index.ejs';
import './ejs/404.ejs';
import './ejs/contact.ejs';
const htmls = ["index", "404", "contact"].map(template => {
new HtmlWebpackPlugin({
template: `./static/${template}.html`,
filename: `${template}.html`,
chunks: [`${template}`]
})
};
module.exports = {
entry: {
index: './ejs/index.ejs',
404: './ejs/404.ejs',
contact: '. / ejs / contact.ejs'.
},
plugins: [htmls]
};