mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
+2







![dependabot[bot]](/assets/img/avatar_default.png)
774d418b0e
* Blog: launch week 3 (#4087) * init launch post * Adds some text * Adds the launch week history * Adds link to blog post * updates the Friday of the previous launch week * chore: update images * chore: optimize images Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> * Fix/blog images (#4089) * adds blog image * Removes the full stops * remove full stops * fixes elf * Fix og image of blog post (#4091) * Fix typo * Fix typo * Fix link to supabase.io (#4095) * Fix link to supabase.io * Change supabase.io to supabase.com * Fix typo * Optimize blog post images (#4103) * Optimize blog post images * Update to jpg * Optimize blog post images * Optimize blog post images * Update Community.tsx * change links to point directly to supabase.com (#4111) * Fix #4109 - Add docs url for Dart (#4113) * Update examples.mdx (#4114) * Fix broken twitter urls. (#4116) * FIx broken links in new project card (#4119) * Update local development docs (#4098) * Update DEVELOPERS.md * Update DEVELOPERS.md * Change supabase.io to supabase.com * Change app.supabase.com to app.supabase.io * chore(deps): bump algoliasearch-helper from 3.2.2 to 3.6.2 in /about (#4048) Bumps [algoliasearch-helper](https://github.com/algolia/algoliasearch-helper-js) from 3.2.2 to 3.6.2. - [Release notes](https://github.com/algolia/algoliasearch-helper-js/releases) - [Changelog](https://github.com/algolia/algoliasearch-helper-js/blob/develop/CHANGELOG) - [Commits](https://github.com/algolia/algoliasearch-helper-js/compare/3.2.2...3.6.2) --- updated-dependencies: - dependency-name: algoliasearch-helper dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add perf tests (#4032) * init some ideas * hide data.sql * add simple test for meta * switch back to old config * revert changes * only use one VU * Add kong test * hide mounted file * move over to Apache Bench * edit translation pt-br (#4039) * edit translation pt-br * format prettier * Update doc links (#4025) * Update doc links * Update doc links * Update dart doc code Updating dart code to keep consistent. * Update with-vue-3.mdx (#3454) * chore(deps): bump next from 11.0.1 to 11.1.1 in /studio (#4062) Bumps [next](https://github.com/vercel/next.js) from 11.0.1 to 11.1.1. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v11.0.1...v11.1.1) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump supabase grid to 2.3.7 (#4120) * Bump supabase grid to 2.3.7 * Add some small fixes and bump grid to 2.3.8 * Update all URLs to supabase.io to supabase.com * Revert one change Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com> Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> Co-authored-by: Isaiah Hamilton <isaiah7hamilton@gmail.com> Co-authored-by: Isaiah Hamilton <70828596+Isaiah-Hamilton@users.noreply.github.com> Co-authored-by: Wen Bo Xie <5532241+w3b6x9@users.noreply.github.com> Co-authored-by: Yeganathan S <hilariousengineer@protonmail.com> Co-authored-by: Aftab Alam <532906+one-aalam@users.noreply.github.com> Co-authored-by: Ayhan <2834954+c0b41@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carlos Stenzel <carlosstenzel@hotmail.com> Co-authored-by: Ezequiel Tojo <eze.tojo@gmail.com>
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to the itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
import { FC } from 'react'
import { observer } from 'mobx-react-lite'
// Declare the prop types of your component
interface Props {
sampleProp: string
}
// Name your component accordingly
const ComponentA: FC<Props> = ({ sampleProp }) => {
return <div>ComponentA: {sampleProp}</div>
}
// Observer is so that components listen to mobx store changes
export default observer(ComponentA)