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
# To generate all the Android and IOS files | |
npx expo prebuild | |
# Make sure to connect your device or to run your Emulator | |
npx react-native run-android --mode="release" | |
# If you want to sign the APK and publish to Google Play Store. | |
npx react-native build-android --mode=release | |
# to build local apk |
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
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"paths": { | |
"react-native": ["node_modules/react-native-web"] | |
} | |
} | |
} |
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 admin = require("firebase-admin"); | |
const serviceAccount = require("./serviceAccountKey.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: "your database url (optional)" | |
}); | |
module.exports = (req, res) => { | |
const payload = { |
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
config.plugins = config.plugins.filter(plugin => { | |
return plugin.constructor.name !== 'UglifyJsPlugin'; | |
}) |
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 renderSelect = field => ( | |
<Select | |
id={field.id} | |
name={field.input.name} | |
multi={true} | |
joinValues={true} | |
value={field.input.value} | |
options={field.options} | |
onChange={(val) => field.input.onChange(val)} | |
/> |
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 { connect } from 'react-redux' | |
import { Field, reduxForm } from 'redux-form' | |
const required = value => (value ? undefined : 'Requerido') | |
let ConcursoForm = props => { | |
const { handleSubmit, submitting, invalid } = props | |
return ( | |
<form onSubmit={ handleSubmit }> | |
<Field |
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 renderSelect = (field) => ( | |
<div className="form-group"> | |
<label htmlFor={field.input.name}>{field.label}</label> | |
<select | |
id={field.id} | |
name={field.input.name} | |
defaultValue="" | |
onChange={(event) => field.input.onChange(event.target.value)} | |
onBlur={(event) => field.input.onBlur(event.target.value)} | |
className={`form-control ${field.meta.touched && field.meta.error ? 'error' : ''}`} |
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 renderField = (field) => ( | |
<div className="form-group"> | |
<label htmlFor={field.input.name}>{field.label}</label> | |
<input | |
{...field.input} | |
id={field.input.name} | |
name={field.input.name} | |
className={`form-control ${field.meta.touched && field.meta.error ? 'error' : ''}`} | |
type={field.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
async () => { | |
try { | |
const [locations, categories] = await Promise.all([ | |
getLocations(), | |
getCategories() | |
]) | |
this.setState({locations, categories, loading: false}); | |
} catch (err) { | |
alert("Error: " + err.code + " " + err.message); | |
this.setState({loading: false}); |
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
module.exports = { | |
webpack: (config, { dev }) => { | |
// Perform customizations to config | |
config.node = { | |
fs: 'empty' | |
}; | |
return config | |
} | |
} |
NewerOlder