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, {useState} from 'react'; | |
import {Pressable, Text, View} from 'react-native'; | |
import {launchImageLibrary} from 'react-native-image-picker'; | |
import RNFetchBlob from 'rn-fetch-blob'; | |
const App = () => { | |
const [selectedAssets, setSelectedAssets] = useState([]); | |
const selectAssets = async () => { | |
const response = await launchImageLibrary({ |
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 path = require('path') | |
const spawn = require('cross-spawn') | |
const execSync = require('child_process').execSync | |
const root = path.resolve('project') | |
let command | |
let args = [] | |
try { | |
execSync('yarn -v', { stdio: 'ignore' }) |
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 mongoose = require('mongoose') | |
mongoose.connect('mongodb://localhost:27017/playground', { | |
useNewUrlParser: true, | |
}) | |
const catSchema = mongoose.Schema( | |
{ | |
name: String, | |
age: Number, |
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
FROM node:12.4.0-alpine as build | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn | |
COPY src ./src | |
COPY public ./public | |
RUN yarn build | |
FROM nginx:1.17.0-alpine | |
COPY --from=build /usr/src/app/build /usr/share/nginx/html |
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, { Component } from 'react' | |
import { Form, Input } from 'antd' | |
class App extends Component { | |
handleSubmit = (e) => { | |
e.preventDefault() | |
this.props.form.validateFields((err, values) => { | |
if (!err) { | |
console.log('Received values of form: ', values) | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="root"></div> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="root"></div> |
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 { StyleSheet, Text, View, PanResponder } from 'react-native' | |
export default class App extends React.Component { | |
state = { | |
top: 0, | |
left: 0, | |
topTransition: 0, | |
leftTransition: 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
const persistConfig = { | |
key: 'root', | |
storage: storage, | |
blacklist: ['language'] // whitelist: ['language'] | |
}; |
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 { Provider } from 'react-redux' | |
import { PersistGate } from 'redux-persist/integration/react' | |
import App from './components/App' | |
import configureStore from './store' | |
const { store, persistor } = configureStore() | |
ReactDOM.render( |
NewerOlder