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("testFunction", async (request) => { | |
yolo | |
}); |
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.beforeSave('History', req => { | |
// logic will only get called if req.master is false | |
},{ | |
skipWithMasterKey: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.beforeSave(Parse.User, () => { | |
// any additional beforeSave logic here | |
}, { | |
fields: { | |
accType: { | |
default: 'viewer', | |
constant: true | |
}, | |
}, | |
}); |
NewerOlder