Skip to content

Glossary

Gissel Diaz edited this page Dec 10, 2021 · 18 revisions

React-Native

  • SafeAreaProvider

Allows you to position your content appropriately around notches, status bars, home indicators and other device or operating system specific interface elements. Provides SafeAreaView in place of View

      import { SafeAreaProvider } from "react-native-safe-area-context";

      export default function App() {
        return (<SafeAreaProvider>...</SafeAreaProvider>);
      }

Expo

  • registerRootComponent:

This function tells Expo what component to use as the root component for your app. In this project, that will be App from App.tsx. It does not return a value.

      import { registerRootComponent } from 'expo';
      
      registerRootComponent(App);

React Navigation/ TypeScript

  • type RootStackParamList:

Object type that contains mappings for route names to the params of the route This is used to type check route names and params. Specifying @param undefined means the route has no params with params: Profile: {userId: string }; Feed: { sort: 'latest' | 'top' } | undefined; Must be passed to createStackNavigator<...> to use. In: src/navigation/index.tsx

     export type RootStackParamList = {
       Navigation: undefined;
       LogIn: undefined;
       SignUp: undefined;
       HomePage: undefined;
       Chat: undefined;
       UserProfile: undefined;
       RivalsList: undefined
     }

Firebase Function Definitions

  • createUserWithEmailAndPassword():

Creates a new user account associated with the specified email address and password. On successful creation of the user account, this user will also be signed in to your application. User account creation can fail if the account already exists or the password is invalid.

  • signInWithEmailAndPassword():

Asynchronously signs in using an email and password. Fails with an error if the email address and password do not match.

  • onAuthStateChanged():

Adds an observer for changes to the user's sign-in state.

  • signOut():

Signs out the current user.

  • onSnapshot():

You can listen to a document with the onSnapshot() method. An initial call using the callback you provide creates a document snapshot immediately with the current contents of the single document. Then, each time the contents change, another call updates the document snapshot.

Clone this wiki locally