React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
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 { useState, useEffect } from 'react'; | |
import { database } from './'; | |
import UserStorage from '../shared/UserStorage'; | |
export async function save(data) { | |
const { uid } = await UserStorage.getUser(); | |
const request = await database.ref(`user/${uid}/decks`); | |
await request.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 { Module, Global, DynamicModule } from '@nestjs/common' | |
import { EnvModule } from './env.module' | |
import { EnvService } from './env.service' | |
import { TypeOrmModule } from '@nestjs/typeorm' | |
function DatabaseOrmModule (): DynamicModule { | |
const config = new EnvService().read() | |
return TypeOrmModule.forRoot({ | |
type: config.DB_TYPE, |
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
// This is an advanced example! It is not intended for use in application code. | |
// Libraries like Relay may make use of this technique to save some time on low-end mobile devices. | |
// Most components should just initiate async requests in componentDidMount. | |
class ExampleComponent extends React.Component { | |
_hasUnmounted = false; | |
state = { | |
externalData: null, | |
}; |
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 Koa from 'koa' | |
import parse from './busboy' | |
import AWS from 'aws-sdk' | |
const app = new Koa() | |
const s3 = new AWS.S3({ | |
params: { Bucket: 'myBucket' } | |
}) |
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
******** PARTE 1 - COMANDOS BÁSICOS | |
## Para listar as imagens existentes localmente | |
-> docker images | |
## Para rodar um container | |
-> docker run -it centos /bin/bash | |
run > executar uma imagem | |
-i > interatividade |
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
var Distance = (function () { | |
var toRad = function (num) { | |
return num * Math.PI / 180 | |
} | |
return function Distance(start, end, options) { | |
options = options || {} | |
var radii = { |
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
componentDidMount() { | |
let prevState = this.props.getState(); | |
this.unsubscribe = | |
this.props.subscribe(() => { | |
const state = this.props.getState(); | |
if (state != prevState) { | |
this.forceUpdate(); | |
prevState = state; | |
} | |
}); |
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, {Component} from 'react'; | |
class $NAME extends Component { | |
render() { | |
return ( | |
); | |
} | |
} |
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 { | |
View, | |
Text, | |
} from 'react-native'; | |
import { TextInputMask } from 'react-native-masked-text' | |
export default function maskedInputTemplate(locals) { | |
if (locals.hidden) { | |
return null; |
NewerOlder