Table of Contents generated with DocToc
This file contains hidden or 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
| # Convex + TanStack Start Integration Guidelines | |
| Esta sección describe cómo integrar Convex eficientemente con TanStack Start, cubriendo los patrones más comunes para queries, mutations y actions. | |
| ## Setup inicial | |
| Antes de usar estos patrones, asegúrate de tener configurado el ConvexProvider en tu aplicación TanStack Start: | |
| ```ts | |
| // src/root.tsx o src/router.tsx |
This file contains hidden or 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
| --- | |
| description: Guidelines and best practices for building Convex projects, including database schema design, queries, mutations, and real-world examples | |
| globs: `**/*.ts,**/*.tsx,**/*.js,**/*.jsx` | |
| --- | |
| # Convex guidelines | |
| ## Function guidelines | |
| ### New function syntax |
This file contains hidden or 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
| /* | |
| 2520 is the smallest number that can be divided by | |
| each of the numbers from 1 to 10 without any remainder. | |
| What is the smallest positive number that is evenly | |
| divisible by all of the numbers from 1 to 20? | |
| */ |
This file contains hidden or 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
| let csvAtom = Recoil.atom({key: "csvAtom", default: Belt.Map.String.empty}) | |
| let headers = ( | |
| `codigo`, | |
| `descripcion`, | |
| `cantidad requerida`, | |
| ) | |
| module CsvButton = { | |
| type makeCsvData = {fields: array<string>, data: array<array<string>>} |
This file contains hidden or 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
| const If = ({ children, orThis, it }) => { | |
| return it ? children : orThis; | |
| } | |
| // usage example | |
| <div> | |
| <If it={age > 18} orThis={"🥤"}> 🍺 </If> | |
| </div> |
This file contains hidden or 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
| module.exports = [ | |
| { | |
| _key: 'MEXICAN_TACOS', | |
| _id: 'recipes/MEXICAN_TACOS', | |
| _rev: '_XTqNHIW--_', | |
| name: 'MEXICAN TACOS', | |
| Calories: 150, | |
| Fat: 5, | |
| Carbs: 1, | |
| Protein: 23, |
This file contains hidden or 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
| const If = ({ children, orThis, it }) => { | |
| return it ? children : orThis; | |
| } | |
| // usage example | |
| <div> | |
| <If it={age > 18} orThis={"🥤"}> 🍺 </If> | |
| </div> |
This file contains hidden or 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
| var c = document.getElementById("myCanvas"); | |
| var ctx = c.getContext("2d"); | |
| var imgs = { | |
| "spaceShip" : document.getElementById("space"), | |
| "scream" : document.getElementById("scream") | |
| } | |
| function Scene(context, width, height, images){ | |
| this.context = context; | |
| this.width = width; |
NewerOlder