Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Guidelines for React with TypeScript#89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
samirsilwal wants to merge4 commits intomaster
base:master
Choose a base branch
Loading
fromfeat/react-guidelines
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletionsdocs/react/components.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
---
id: components
title: Components
sidebar_label: Components
---

#### The following convention should be followed for components naming:

* `PascalCase` should be used to name the component file.
* Name of the component should match the filename
* It should be understandable by everyone (no **EntityForListItem)
* it should be simple to use (no SimpleBeanFactoryAwareAspectInstanceFactory)
<br />
```
const SumbitButton = (props: SubmitButtonProps) => {
return (
<div>
....
</div>
)
}
```

30 changes: 30 additions & 0 deletionsdocs/react/files.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
---
id: files
title: Files
sidebar_label: Files
---

#### The following convention should be followed for different files name:

* **Interfaces** -
* `PascalCase` should be used for the interfaces names.
* Files could be categorized into folders like
```
> domain
> requests
> responses
> states
> others
```

* **Enums** -
* `PascalCase` should be used for the enum file names.
* Enums could be organized into folder like
```
> enums
Roles.ts
UserType.ts
```
* **Constants** -
* `camelCase` should be used for constants file names.

24 changes: 17 additions & 7 deletionssidebars.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,8 +43,8 @@ module.exports =
"type": "category",
"label": "Practices and Tools",
"items": [
"python/general",
"python/tools"
"python/general",
"python/tools"
]
},
"python/docstrings",
Expand DownExpand Up@@ -80,6 +80,16 @@ module.exports =
]
}
],
"React (TypeScript)": [
{
"type": "category",
"label": "Naming Conventions",
"items": [
"react/components",
"react/files"
]
}
],
"Java": [
{
"type": "category",
Expand All@@ -102,15 +112,15 @@ module.exports =
]
}
],
"NoSQL": [
"NoSQL": [
{
"type": "category",
"label": "Document DB",
"items": [
"nosql/documentdb/document-db-naming-convention",
"nosql/documentdb/one-to-one-relationship",
"nosql/documentdb/one-to-many-relationship",
"nosql/documentdb/many-to-many-relationship"
"nosql/documentdb/document-db-naming-convention",
"nosql/documentdb/one-to-one-relationship",
"nosql/documentdb/one-to-many-relationship",
"nosql/documentdb/many-to-many-relationship"
]
}
],
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp