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
# Forma actual para borrar datos sensibles de GIT en commits recientes | |
## Usando *git filter-repo* y solo cambiando la rama actual (en menos de 1 minuto) | |
mkdir backup_repo | |
# 1. Clonar repo fresco desde origin y entrar a la rama | |
git clone git@github.com:Company/repo_a_modificar.git | |
cd repo_a_modificar | |
git checkout feature/nombre_de_la_rama |
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 * as React from 'react'; | |
import AsyncStorage from '@react-native-community/async-storage'; | |
export default function App({ navigation }) { | |
const [state, dispatch] = React.useReducer( | |
(prevState, action) => { | |
switch (action.type) { | |
case 'RESTORE_TOKEN': | |
return { | |
...prevState, |
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
// forked from Cristobal Aguirre at https://dev.to/selbekk/persisting-your-react-state-in-9-lines-of-code-9go | |
const initialState = { | |
//other state | |
cartItems: JSON.parse(localStorage.getItem('cart_items')) || [], | |
} | |
function reducer(state, action) { | |
switch (action.type) { | |
case 'UPDATE_CART': { |