Skip to content

Instantly share code, notes, and snippets.

View betomoedano's full-sized avatar
💭
keep moving, don't settle 🚀

Beto betomoedano

💭
keep moving, don't settle 🚀
View GitHub Profile
@betomoedano
betomoedano / _layout.tsx
Created September 24, 2024 20:54
Universal modal with Expo Router
export default function RootLayout() {
return (
<Stack>
<Stack.Screen
name="(drawer)"
options={{
headerShown: false,
}}
/>
<Stack.Screen
@betomoedano
betomoedano / .expo-server-manager.sh
Created October 21, 2025 17:10
Expo Server Manager - Prompts to kill existing port 8081 process before starting Expo dev server
#!/bin/zsh
# Expo Server Manager - Prompts to kill existing port 8081 process before starting Expo dev server
#
# Setup:
# 1. Save this file to ~/.expo-server-manager.sh
# 2. Add to ~/.zshrc: source ~/.expo-server-manager.sh
# 3. Add aliases:
# alias es='start_expo false'
# alias esc='start_expo true'
@betomoedano
betomoedano / babel.config.js
Created December 17, 2025 16:01
React Compiler cannot run on widget files because they are invoked outside React.
const path = require("path");
module.exports = function (api) {
api.cache(true);
const widgetDir = path.join(__dirname, "widget") + path.sep;
const normalizedWidgetDir = widgetDir.replace(/\\/g, "/");
return {
presets: [
@betomoedano
betomoedano / Button.tsx
Created January 16, 2026 18:55
Button that uses native colors and symbols
import { Color } from "expo-router";
import { SymbolView, SymbolViewProps } from "expo-symbols";
import React from "react";
import {
Platform,
Pressable,
PressableProps,
StyleSheet,
Text,
} from "react-native";
@betomoedano
betomoedano / ralph.sh
Created January 17, 2026 19:11
Ralph Wiggum Script
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <iterations>"
exit 1
fi
for ((i=1; i<=$1; i++)); do
echo "Iteration $i"
echo "--------------------------------"
@betomoedano
betomoedano / PhotoDetail.tsx
Created April 11, 2026 22:20
Cool Bottom Toolbar - iOS Expo Router v7
import { Stack } from "expo-router";
import { useState } from "react";
import { Image, Text, View } from "react-native";
const SAMPLE_IMAGE = "https://picsum.photos/200";
export default function PhotoDetail() {
const [liked, setLiked] = useState(false);
return (