Skip to content

Commit

Permalink
fix(templates): tiny adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
gauthierpetetin committed Aug 30, 2023
1 parent aedbdbd commit 725877d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
24 changes: 0 additions & 24 deletions .github/LABELING_GUIDELINES.md

This file was deleted.

6 changes: 3 additions & 3 deletions .github/coding_guidelines/CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### 1. New Code Should be Typescript
- New components and utilities should be written in Typescript and enforce typing.
- Existing code should be refactored into Typescript where time allows. If you are replacing a component use Typescript.
- Existing code should be refactored into Typescript where time allows. If you are replacing a component, use Typescript.

### 2. Using Functional Components and Hooks Instead of Classes
- Use functional components and hooks as they result in more concise and readable code compared to classes.
Expand Down Expand Up @@ -33,8 +33,8 @@ AvatarAccount
- If you notice you are writing duplicated code or components, convert it into a component, utility functions or hooks that can be reused. Do this with [scalable intention](https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction).

### 6. Component Optimization
- For functional components, instead of having large return statements, break the component down into smaller sub-components.
- Use memoizing techniques where possible. Utilize the useMemo hook for values and useCallback for functions. Follow recommended React Native guidance.
- For functional components, instead of having large return statements, breaking the component down into smaller sub-components.
- Use memoizing techniques where possible. Utilize the `useMemo` hook for values and `useCallback` for functions. Follow recommended React Native guidance.

### 7. Use Object Destructuring For Props
- Instead of passing the props object, use object destructuring to pass the prop name. This discards the need to refer to the props object each time you need to use it.
Expand Down

0 comments on commit 725877d

Please sign in to comment.