Last active
September 1, 2022 17:23
-
-
Save CarlaKremer/d04522ca0bcd8e5803f731014f8e9677 to your computer and use it in GitHub Desktop.
Backup for React Native snippets I use
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
Show hidden characters
{ | |
"Basic React Native Interface": { | |
"prefix": "rnfc", | |
"body": [ | |
"import React from 'react'", | |
"", | |
"import {", | |
" Container", | |
"} from './styles';", | |
"", | |
"export function ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}}() {", | |
"return (", | |
" <Container>", | |
"", | |
" </Container>", | |
");", | |
"}", | |
] | |
}, | |
"Basic React Native Interface const": { | |
"prefix": "rnc", | |
"body": [ | |
"import React from 'react'", | |
"", | |
"import {", | |
" Container", | |
"} from './styles';", | |
"", | |
"const ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} = () => {", | |
"return (", | |
" <Container>", | |
"", | |
" </Container>", | |
");", | |
"}", | |
"export default ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}};" | |
] | |
}, | |
"Basic React Native Interface Index": { | |
"prefix": "rni", | |
"body": [ | |
"import React from 'react'", | |
"", | |
"import {", | |
" Container", | |
"} from './styles';", | |
"", | |
"const Index: React.FC = () => {", | |
"return (", | |
" <Container>", | |
"", | |
" </Container>", | |
");", | |
"}", | |
"export default Index;" | |
] | |
}, | |
"Basic React Native Styled Components": { | |
"prefix": "rnsc", | |
"body": [ | |
"import styled from 'styled-components/native';", | |
"", | |
"export const Container = styled.View`", | |
" flex: 1;", | |
"`;" | |
] | |
}, | |
"Use Effect" : { | |
"prefix": "uef", | |
"body": [ | |
"useEffect(() => {", | |
" ", | |
"},[]);" | |
] | |
}, | |
"Tron" : { | |
"prefix": "tron", | |
"body": [ | |
"console.tron.log($0);" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment