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 * as Native from 'react-native'; | |
import styled from 'styled-components' | |
import TextInputMask from 'react-native-text-input-mask' | |
const Layout = { | |
Container: styled.View` | |
align-items: center; | |
justify-content: center; | |
padding: 5%; |
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, { useState } from 'react'; | |
import { Text, TextInput, View } from 'react-native'; | |
const Application = () => { | |
const [text, setText] = useState(''); | |
function onChangeText(text) { | |
setText(text.replaceAll(/[0-9]/g,'X')) | |
} | |
return ( | |
<View> |
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, { useState } from 'react'; | |
import { Button, Text, TextInput, View } from 'react-native'; | |
export default function Application() { | |
const [text, setText] = useState(''); | |
const [enableSecure, setEnableSecure] = useState(true); | |
function toggleSecure() { | |
setEnableSecure(value => !value) | |
} | |
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
<TextInput | |
keyboardType="email-address" | |
onChangeText={setText} | |
defaultValue={text} | |
/> |
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, { useState } from 'react'; | |
import { Text, TextInput, View } from 'react-native'; | |
export default function Application() { | |
const [text, setText] = useState(''); | |
return ( | |
<View> | |
<TextInput | |
onChangeText={text => setText(text)} | |
defaultValue={text} |
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 Form = [ | |
{ | |
slug: 'textinput1', | |
label: 'Simple Textual Input', | |
props: { | |
placeholder: 'Edit me!' | |
} | |
}, | |
{ | |
slug: 'mailaddress', |
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
Parse.Cloud.afterLiveQueryEvent('DogObject', async (request) => { | |
if (request.event == "Create") { | |
// If I am creating a new Dog | |
const thisDog = request.object; | |
thisDog.set('name', 'Fido'); // Set its name to Fido | |
} else if (request.event == "update") { | |
// Else, if I am Updating an existing Dog | |
const thisDog = request.object; | |
thisDog.set('name', 'Rex'); // Set its name to Rex | |
} else { |
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
Parse.Cloud.define("DogsWithRegex", async (request) => { | |
// Returns all Dogs that are owned by a given name. The name must be at least 3 characters long to be valid. | |
const query = new Parse.Query("Dog"); | |
query.equalTo("owner", request.params.owner); // We use the owner parameter to match | |
const results = await query.find(); | |
return results; | |
},{ | |
fields : { | |
owner : { | |
required: true, |
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
Parse.Cloud.define("DogsBetweenAges", async (request) => { | |
// Returns all Dogs that are between two given ages | |
const query = new Parse.Query("Dog"); | |
query.greaterThanOrEqualTo("minimumAge", request.params.minimumAge); // Uses the minimumAge parameter | |
query.lessThanOrEqualTo("maximumAge", request.params.maximumAge); // Uses the maximumAge parameter | |
const results = await query.find(); | |
return results | |
},{ | |
fields : ['minimumAge', 'maximumAge'], | |
requireUser: true |
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
Parse.Cloud.define("testFunction", async (request) => { | |
yolo | |
}); |
NewerOlder