This file contains hidden or 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'; | |
import _ from 'lodash'; | |
import shortid from 'shortid'; | |
const App = () => { | |
const experiment = n => console.log(n); | |
return ( | |
<h1> |
This file contains hidden or 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
"editor.tokenColorCustomizations": { | |
"[LaserWave Italic]": { | |
"textMateRules": [ | |
{ | |
"scope": [ | |
"comment.block", | |
"comment.line.double-slash.js.jsx", | |
"comment.line" | |
], | |
"settings": { |
This file contains hidden or 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
[test]: Update test/* files | |
[dist]: Changes to submodules, version bumps, updates to package.json | |
[minor]: Small changes | |
[doc]: Updates to documentation | |
[fix]: Bug fixes | |
[bin]: Update binary scripts associated with the project | |
[refactor]: Refactor of existing code | |
[nit]: Small code review changes mainly around style or syntax | |
[feat]: New features |
This file contains hidden or 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'; | |
export default function useCounter() { | |
const [count, setCount] = React.useCounter(0); | |
function increment() { | |
setCount(count + 1); | |
} | |
function decrement() { |
This file contains hidden or 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 { useCounter } from '../hooks'; | |
export default function CounterWithHooks({ count, increment, decrement }) { | |
return ( | |
<> | |
<p>Count: {count}</p> | |
<button type="button" onClick={increment} /> | |
<button type="button" onClick={decrement} /> | |
</> | |
) |
This file contains hidden or 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"; | |
export default function withCounter(Component) { | |
return class extends React.Component { | |
constructor() { | |
super(); | |
this.state = { | |
count: 0, | |
}; |
This file contains hidden or 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 { withCounter } from '../hoc'; | |
function ComponentNeeedingCounterFunctionality({ count, increment, decrement }) { | |
return ( | |
<> | |
<p>Count: {count}</p> | |
<button type="button" onClick={increment}>Increment</button> | |
<button type="button" onClick={decrement}>Decrement</button> | |
</> | |
); |
This file contains hidden or 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'; | |
export default class Counter extends React.Component { | |
constructor() { | |
this.state = { | |
count: 0 | |
} | |
this.increment = this.increment.bind(this); | |
this.decrement = this.decrement.bind(this); |
This file contains hidden or 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
(() => { | |
// Constants | |
const MUTATION_TYPE = { | |
attributes: 'attributes' | |
}; | |
const OBSERVER_CONFIG = { | |
attributes: true | |
}; | |
const MOUSE_EVENT_CONFIG = { | |
view: window, |
This file contains hidden or 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
/** | |
* Даден е двумерен масив A с m реда n стълба. Да се се състави | |
* блоксхема на алгоритъм, чрез който се създава нов масив b1, b2, ..., bm | |
* като стойността на bi е равна на средното аритметично на ненулевите | |
* елементи в i-ия ред. Да се състави програма по този алгоритъм. | |
*/ | |
#include<iostream> | |
#include<stdlib.h> | |
using namespace std; |
OlderNewer