Some ideas about new functions that can be added as an extension to the firebase functions library.
This functions is triggered when a field inside a document is added to the document for the first time. That can be if:
import React from "react"; | |
import { View } from "react-native"; | |
import { connect } from "react-redux"; | |
import ProgressOverlay from "react-native-progress-overlay"; | |
const App = props => { | |
return ( | |
<View> | |
<ProgressOverlay visible={props.visible} text={props.text} /> |
const initialState = { | |
visible: false, | |
text: "" | |
}; | |
export default (state = initialState, action) => { | |
switch (action.type) { | |
case "SHOW_PROGRESS": | |
return { | |
...state, |
export const showProgress = (text) => ({ | |
type: "SHOW_PROGRESS", | |
text | |
}); | |
export const hideProgress = () => ({ | |
type: "HIDE_PROGRESS" | |
}); |
import React from "react"; | |
import { Text, View } from "react-native"; | |
import ProgressOverlay from "react-native-progress-overlay"; | |
const Home = props => { | |
return ( | |
<View style={{ flex: 1 }}> | |
<ProgressOverlay visible={true} /> | |
<Text>Hi, this is my Home screen!</Text> |
import { sayHello } from "./new-export"; | |
import sayHello from "./new-export"; |
export const sayHello = name => `Merhaba ${name}!`; | |
export default name => `Merhaba ${name}!`; |
const sayHello = require("./old-export"); |
exports.sayHello = name => `Merhaba ${name}!`; | |
module.exports = name => `Merhaba ${name}!`; |
const sayHello = (name, surname) => 'Merhaba ' + name + ' '+ surname + '!'; // 💩 Karmaşık | |
const sayHello = (name, surname) => `Merhaba ${name} ${surname}!`; // 🎉 Daha kolay |