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
const useImageColor = (throwOnError = false) => { | |
const [element, setElement] = useState<HTMLImageElement | null>(null) | |
const [color, setColor] = useState<string | null>(null) | |
const ref = useCallback( | |
(image: HTMLImageElement | null) => { | |
if (image) { | |
image.crossOrigin = 'Anonymous' | |
setElement(image) | |
} |
This file has been truncated, but you can view the full file.
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
{ | |
"__schema": { | |
"queryType": { | |
"name": "Query" | |
}, | |
"mutationType": { | |
"name": "Mutation" | |
}, | |
"subscriptionType": null, |
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
### Title options: | |
- GraphQL hoje para aplicações client-side que ainda dependem de APIs REST. | |
- GraphQL today using Apollo for applications that still depend on REST apis | |
- Wrapping REST apis with GraphQL using Apollo stack | |
# GraphQL today using Apollo for applications that still depend on REST APIs | |
Even though people using GraphQL are often extremely excited about the technology, it's popularity is [still growing slowly](https://trends.google.com/trends/explore?date=2014-03-14%202017-03-14&q=GraphQL). Developers working on client-side applications are the ones to benefit the most from GraphQL, but migrating a backend from a working REST API might not be economically justifiable for most teams. What most don't realize, though, is that it is not completely necessary to make the switch on both sides before adopting the technology. The main [JavaScript implementation](https://github.com/graphql/graphql-js) of a GraphQL server runs just fine on the browser, and [Apollo](http://www.apollodata.com/) makes it e |
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
# GraphQL hoje usando Apollo em aplicações que ainda dependem de APIs REST | |
Apesar do entusiamo das pessoas que já estão usando GraphQL, a popularidade da ferramenta está [crescendo a passos curtos](https://trends.google.com/trends/explore?date=2014-03-14%202017-03-14&q=GraphQL). Desenvolvedores trabalhando no client-side das aplicações são os que mais rapidamente têm a ganhar com o GraphQL, mas poucos ainda conseguem justificar o investimento financeiro na migração de um backend em pleno funcionamento servindo uma API REST. O que poucos percebem, porém, é que não é preciso fazer a migração simultaneamente no servidor antes de começar a usar a tecnologia no client-side. A [implementação de referência](https://github.com/graphql/graphql-js) para servidores GraphQL é escrita em JavaScript, roda muito bem em navegadores, e é ainda mais fácil de usar quando combinada com as ferramentas fornecidas pelo [Apollo](http://www.apollodata.com/). | |
> Se você prefere Relay, deveria ler [esse post](http://graphql.org/blog/r |
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
### Title options: | |
- GraphQL hoje para aplicações client-side que ainda dependem de APIs REST. | |
- GraphQL today using Apollo for applications that still depend on REST apis | |
- Wrapping REST apis with GraphQL using Apollo stack | |
# GraphQL today using Apollo for applications that still depend on REST APIs | |
Even though people using GraphQL are often extremely excited about the technology, it's popularity is [still growing slowly](https://trends.google.com/trends/explore?date=2014-03-14%202017-03-14&q=GraphQL). Developers working on client-side applications are the ones to benefit more from GraphQL, but migrating a backend from a working REST API might not be economically justifiable for most teams. What most don't realize, though, is that it is not completely necessary to make the switch on both sides before adopting the technology. The main [JavaScript implementation](https://github.com/graphql/graphql-js) of a GraphQL server runs just fine on the browser, and [Apollo](http://www.apollodata.com/) makes it easy a |
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
### Title options: | |
- GraphQL hoje para aplicações client-side que ainda dependem de APIs REST. | |
- GraphQL today using Apollo for applications that still depend on REST apis | |
- Wrapping REST apis with GraphQL using Apollo stack | |
# GraphQL today using Apollo for applications that still depend on REST APIs | |
Even though people using GraphQL are often extremely excited about the technology, it's popularity is [still growing slowly](https://trends.google.com/trends/explore?date=2014-03-14%202017-03-14&q=GraphQL). Developers working on client-side applications are the ones to benefit more from GraphQL, but migrating a backend from a working REST API might not be economically justifiable for most teams. What most don't realize, though, is that it is not completely necessary to make the switch on both sides before adopting the technology. The main [JavaScript implementation](https://github.com/graphql/graphql-js) of a GraphQL server runs just fine on the browser, and [Apollo](http://www.apollodata.com/) makes it easy a |
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
Títulos | |
1. Arquitetura Fractal - Um Ensaio Usando Webpack e React | |
2. Um Ensaio sobre Arquitetura Fractal usando Webpack e React | |
Aplicações de menor porte são normalmente organizadas de modo a separar os arquivos por *natureza*; componentes, [contêineres](https://css-tricks.com/learning-react-container-components/), rotas, etc. O resultado é uma aplicação com uma estrutura parecida a esta: | |
``` | |
components/ | |
Header.js | |
HomePage.js |
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
<?php | |
/** | |
* Helper to grant/revoke permissions. | |
* | |
* @param | |
* A associative array map of permissions to grant/remove. | |
* Example: | |
* array( | |
* 'all' => array( |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@import "compass"; | |
div { | |
@include opacity(0.5); | |
} |
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
/** | |
* Jus' encapsulating to avoid pluting global scope. | |
*/ | |
(function () { | |
var kolorContainer = document.querySelector('#kolor-kolor') | |
, buttons = document.querySelectorAll('#kolor-start, #kolor-restart') | |
, endBlock = document.querySelector('#kolor-end-block') | |
, interval; |
NewerOlder