Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tm/feature/react guidelines #819

Merged
merged 25 commits into from
Apr 16, 2024
Merged
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9a1d6d5
Start work on react-guidelines
arhtudormorar Dec 1, 2023
ee90fc8
Update structure
arhtudormorar Dec 1, 2023
ebe496e
Update docs
arhtudormorar Dec 4, 2023
d785391
Add rule for true
arhtudormorar Dec 4, 2023
1cf3914
Updated react-development-guidelines.md function length
razvantomegea Dec 4, 2023
4f68e8d
Code updates
arhtudormorar Dec 5, 2023
b23f06f
Update file and url structure
arhtudormorar Dec 5, 2023
c8e68f9
Minor update
arhtudormorar Dec 5, 2023
eefe2f3
Minor updates
arhtudormorar Dec 5, 2023
3877790
Merge branch 'main' into tm/feature/react-guidelines
arhtudormorar Dec 5, 2023
2fc6b51
Added react guideline for number of props per component
arhtudormorar Dec 6, 2023
c6c3a36
Minor update
arhtudormorar Dec 6, 2023
4231673
Add solutions
arhtudormorar Dec 6, 2023
b86e1e4
Merge branch 'main' into tm/feature/react-guidelines
arhtudormorar Dec 6, 2023
9af7408
Added destructuring rule
arhtudormorar Feb 2, 2024
a133ea2
Minor edit
arhtudormorar Feb 2, 2024
5e9940d
Extend Destructuring arguments
arhtudormorar Feb 6, 2024
ab0ce02
Merge branch 'main' into tm/feature/react-guidelines
arhtudormorar Feb 6, 2024
6913234
Merge pull request #852 from multiversx/development
andreibancioiu Apr 1, 2024
9884165
Merge pull request #856 from multiversx/development
andreibancioiu Apr 3, 2024
4c965fd
Merge pull request #860 from multiversx/development
andreibancioiu Apr 4, 2024
206a5cb
Merge pull request #864 from multiversx/development
andreibancioiu Apr 5, 2024
997c462
Merge pull request #867 from multiversx/development
andreibancioiu Apr 8, 2024
4e31b06
Merge pull request #869 from multiversx/development
danidrasovean Apr 10, 2024
af0cca6
Merge branch 'main' into tm/feature/react-guidelines
dragos-rebegea Apr 16, 2024
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
17 changes: 14 additions & 3 deletions docs/developers/guidelines/react-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,19 @@ function printUser({ name, age }) {
```

There are exceptions to this rule like:
1. There is a name clash with variables defined above
1. The arguments are optional

```jsx
function logWithOptions(options?: {green?: boolean}) {
if (options?.green) {
return console.log('\x1b[42m%s\x1b[0m', 'Some green text');
}
console.log('Some normal text');
}

```

2. There is a name clash with variables defined above

```jsx
const type = 'admin';
Expand All @@ -274,8 +286,7 @@ function verifyUser(user) {
}

```
2. Same props are passed below to a component, or are used for further processing

3. Same props are passed below to a component, or are used for further processing

```jsx
// 🚫 DON'T
Expand Down
Loading