Tech | React | Vue |
---|---|---|
contributors | 1283 | 264 |
- минусы | нехватка гибкости, топорность | |
малая доля проектов в сети | ||
есть жалобы на полноту | ||
+ плюсы | появилась дока на русском | |
в тренде | ||
стремительное развитие фрейма | ||
легкий ssr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const complexArray = [[1, 2], 3, [5, [6, 7]]] | |
const flatten = (complexArray) => { | |
const output = []; | |
(function flatDepth(complexArray) { | |
array.forEach((data) => { | |
if (Array.isArray(data)) { | |
flatDepth(data); | |
} else { | |
output.push(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
class App extends React.Component { | |
componentDidMount() { | |
const Closure = (() => { | |
let _value = 0; | |
return { | |
print: () => _value, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showParrotsArmy() { | |
var parrotsStr = [], | |
parrots = [ | |
':congaparrot:', | |
':acidpartyparrot:', | |
':middleparrot:', | |
':partyparrot:', | |
':parrotwave1:', | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Каково для вас основное преимущество jQuery по сравнению с "чистым" JavaScript? | |
// В каких случаях применение jQuery не оправдано? | |
Преимущество jQuery в более простом доступе и управлении DOM — это позволяет быстрее разрабатывать интерфейс. Чистый Javascript эффективнее в нетривиальных задачах, когда критична скорость выполнения скрипта. | |
// Что такое NaN? Какого он типа? Как проверить значение на равенство NaN? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Vertical gradient using CSS where possible, and base64-encoded SVG for IE9 (enables use of this in combination with border-radius) | |
// Based on this by Phil Brown: http://blog.philipbrown.id.au/2012/09/base64-encoded-svg-gradient-backgrounds-in-less/ | |
// Also based on a mixin from Twitter Bootstrap: https://github.com/twitter/bootstrap | |
.gradient-vertical(@startColor, @endColor) { | |
// IE9 prep | |
@dataPrefix: ~"url(data:image/svg+xml;base64,"; | |
@dataSuffix: ~")"; | |
@dataContent: ~'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="g743" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop stop-color="@{startColor}" offset="0"/><stop stop-color="@{endColor}" offset="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#g743)"/></svg>'; |