Skip to content

Commit c8c6a69

Browse files
authored
Update boilerplate dependencies (#427)
* chore(version): bump template deps and react native to 0.74 * feat(debug): add reactotron debugger * fix(theme): improve and fix theming * chore(app): improve code structure * chore(doc): update docs on theme improvement and debugger * chore(deps): update locks
1 parent 3380a0a commit c8c6a69

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2685
-2936
lines changed

documentation/docs/04-Guides/04-Theming/03-Generated styles/01-Gutters.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ slug: /theming/generated-styles/gutters
33
sidebar_label: Gutters
44
title: Gutters
55
id: theming-generated-styles_gutters
6-
keywords: [padding, margin, paddings, margins, gutters, spacings]
6+
keywords: [padding, margin, paddings, margins, gutters, spacings, gap]
77
---
88
import Gutters from "../../../../src/components/Gutters";
99

@@ -45,6 +45,7 @@ Where `value` is an array of numbers, the generated keys available through the `
4545
- `paddingLeft_${value}`,
4646
- `paddingVertical_${value}`,
4747
- `paddingHorizontal_${value}`,
48+
- `gap_${value}`,
4849

4950
The corresponding values behind these keys will be:
5051

documentation/docs/04-Guides/04-Theming/03-Generated styles/04-Borders.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ export const config = {
3838
Where `widthsValues` and `radiusValues` are arrays of numbers, `widthValue` is an item of `widthsValues`, `radiusValue` is an item of `radiusValues`, and `colorsValues` is an object with
3939
`colorsKey` keys and `colorsValue` values, the generated styles are as follows:
4040

41-
| font name | Generated style |
42-
|-------------------------------|-----------------------------------|
43-
| borders.w__widthValue_ | \{ borderWidth: _widthValue_ \} |
44-
| borders.rounded__radiusValue_ | \{ borderRadius: _radiusValue_ \} |
45-
| borders._colorsKey_ | \{ borderColor: _colorsValue_ \} |
41+
| border name | Generated style |
42+
|--------------------------------|-----------------------------------|
43+
| borders.w__widthValue_ | \{ borderWidth: _widthValue_ \} |
44+
| borders.wTop__widthValue_ | \{ borderWidth: _widthValue_ \} |
45+
| borders.wBottom__widthValue_ | \{ borderWidth: _widthValue_ \} |
46+
| borders.wLeft__widthValue_ | \{ borderWidth: _widthValue_ \} |
47+
| borders.wRight__widthValue_ | \{ borderWidth: _widthValue_ \} |
48+
| borders.rounded__radiusValue_ | \{ borderRadius: _radiusValue_ \} |
49+
| borders.roundedTop__radiusValue_ | \{ borderRadius: _radiusValue_ \} |
50+
| borders.roundedBottom__radiusValue_ | \{ borderRadius: _radiusValue_ \} |
51+
| borders._colorsKey_ | \{ borderColor: _colorsValue_ \} |
4652

4753

4854
## Static borders styles
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
slug: /debugging
3+
sidebar_label: Debugging
4+
title: Debugging
5+
id: debugging
6+
keywords: [debugging, reactotron]
7+
---
8+
9+
Found a bug in your app? It can be difficult to identify, especially if you're unsure whether it's related to the network or not.
10+
In our boilerplate, we've seamlessly integrated [Reactotron](https://github.com/infinitered/reactotron), a powerful desktop app for inspecting React Native projects.
11+
Reactotron is invaluable during development, offering an easy way to view your application's logs, async storage, network calls, and state.
12+
13+
### Setup
14+
By default, the boilerplate comes with Reactotron already configured, saving you time and effort.
15+
However, if you ever need to fine-tune your Reactotron settings to better suit your
16+
project's requirements, rest assured that it's a breeze to do so.
17+
18+
Simply navigate to the `./ReactotronConfig.js` file, where you'll find
19+
the Reactotron configuration. By default, we've set it up to use the configuration suitable for development environment, ensuring a smooth and hassle-free experience from the get-go.
20+
21+
22+
```typescript
23+
import Reactotron from 'reactotron-react-native';
24+
import mmkvPlugin from 'reactotron-react-native-mmkv';
25+
import {
26+
QueryClientManager,
27+
reactotronReactQuery,
28+
} from 'reactotron-react-query';
29+
30+
import { storage, queryClient } from './src/App';
31+
import config from './app.json';
32+
33+
const queryClientManager = new QueryClientManager({
34+
queryClient,
35+
});
36+
37+
// highlight-next-line
38+
// You can change the storage configuration here
39+
Reactotron.configure({
40+
name: config.name,
41+
onDisconnect: () => {
42+
queryClientManager.unsubscribe();
43+
},
44+
})
45+
.useReactNative()
46+
// highlight-next-line
47+
.use(mmkvPlugin({ storage })) // We use the mmkv plugin to store the Reactotron state
48+
// highlight-next-line
49+
.use(reactotronReactQuery(queryClientManager)) // We use the react-query plugin to store the Reactotron state
50+
.connect();
51+
```
52+
53+
### Going Further
54+
For a deeper dive into the world of debugging with
55+
[Reactotron](https://github.com/infinitered/reactotron),
56+
we invite you to explore its comprehensive documentation.
57+
There, you'll find valuable insights and detailed guidance on harnessing the full potential
58+
of this tool to enhance your app's debugging process.
59+
60+
:::info
61+
We use Reactotron while the official React-Native Debugger is not stable. We recommend using Reactotron for debugging purposes.
62+
:::

documentation/src/components/Borders.tsx

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,46 @@ function Borders() {
8787
<tbody>
8888
{
8989
sizeValues.map((value) => (
90-
<tr>
91-
<td>{`borders.w_${value}`}</td>
92-
<td><code>{`{ borderWidth: ${value} }`}</code></td>
93-
</tr>
90+
<>
91+
<tr>
92+
<td>{`borders.w_${value}`}</td>
93+
<td><code>{`{ borderWidth: ${value} }`}</code></td>
94+
</tr>
95+
<tr>
96+
<td>{`borders.wTop_${value}`}</td>
97+
<td><code>{`{ borderTopWidth: ${value} }`}</code></td>
98+
</tr>
99+
<tr>
100+
<td>{`borders.wRight_${value}`}</td>
101+
<td><code>{`{ borderRightWidth: ${value} }`}</code></td>
102+
</tr>
103+
<tr>
104+
<td>{`borders.wBottom_${value}`}</td>
105+
<td><code>{`{ borderBottomWidth: ${value} }`}</code></td>
106+
</tr>
107+
<tr>
108+
<td>{`borders.wLeft_${value}`}</td>
109+
<td><code>{`{ borderLeftWidth: ${value} }`}</code></td>
110+
</tr>
111+
</>
94112
))
95113
}
96114
{
97115
radiusValues.map((value) => (
98-
<tr>
99-
<td>{`borders.rounded_${value}`}</td>
100-
<td><code>{`{ borderRadius: ${value} }`}</code></td>
101-
</tr>
116+
<>
117+
<tr>
118+
<td>{`borders.rounded_${value}`}</td>
119+
<td><code>{`{ borderRadius: ${value} }`}</code></td>
120+
</tr>
121+
<tr>
122+
<td>{`borders.roundedTop_${value}`}</td>
123+
<td><code>{`{ borderRadius: ${value} }`}</code></td>
124+
</tr>
125+
<tr>
126+
<td>{`borders.roundedBottom_${value}`}</td>
127+
<td><code>{`{ borderRadius: ${value} }`}</code></td>
128+
</tr>
129+
</>
102130
))
103131
}
104132
<tr>

documentation/src/components/Gutters.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ function Gutters() {
5050
{
5151
values.map((value) => (
5252
<>
53+
<tr>
54+
<td>{`gap_${value}`}</td>
55+
<td><code>{`{ gap: ${value} }`}</code></td>
56+
</tr>
5357
<tr>
5458
<td>{`margin_${value}`}</td>
5559
<td><code>{`{ margin: ${value} }`}</code></td>

template/.eslintrc.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ module.exports = {
4545
quotes: ['error', 'single'],
4646
'object-curly-spacing': ['error', 'always'],
4747
'array-bracket-spacing': ['error', 'never'],
48-
'react/require-default-props': ['error'],
48+
'react/require-default-props': [
49+
'error',
50+
{
51+
functions: 'defaultArguments',
52+
},
53+
],
4954
'react/default-props-match-prop-types': ['error'],
5055
'react/sort-prop-types': ['error'],
5156
'react/no-array-index-key': 'off',
@@ -55,6 +60,7 @@ module.exports = {
5560
'import/prefer-default-export': 'off',
5661
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
5762
'react/display-name': 'off',
63+
'no-console': ['error', { allow: ['error'] }],
5864
'prettier/prettier': [
5965
'error',
6066
{

template/.eslintrcJsVersion.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ module.exports = {
5353
'import/prefer-default-export': 'off',
5454
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
5555
'react/display-name': 'off',
56+
'no-console': ['error', { allow: ['error'] }],
5657
'prettier/prettier': [
5758
'error',
5859
{

template/.gitignore

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
template/ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
2727
build/
28-
../.idea
28+
.idea
2929
.gradle
3030
local.properties
3131
*.iml
@@ -56,11 +56,19 @@ yarn-error.log
5656
*.jsbundle
5757

5858
# Ruby / CocoaPods
59-
/ios/Pods/
59+
**/Pods/
6060
/vendor/bundle/
6161

6262
# Temporary files created by Metro to check the health of the file watcher
6363
.metro-health-check*
6464

6565
# testing
6666
/coverage
67+
68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions

template/_gitignore

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
template/ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
2727
build/
28-
../.idea
28+
.idea
2929
.gradle
3030
local.properties
3131
*.iml
@@ -56,11 +56,19 @@ yarn-error.log
5656
*.jsbundle
5757

5858
# Ruby / CocoaPods
59-
/ios/Pods/
59+
**/Pods/
6060
/vendor/bundle/
6161

6262
# Temporary files created by Metro to check the health of the file watcher
6363
.metro-health-check*
6464

6565
# testing
6666
/coverage
67+
68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions

template/android/app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ android {
107107
dependencies {
108108
// The version of react-native is set by the React Native Gradle Plugin
109109
implementation("com.facebook.react:react-android")
110-
implementation("com.facebook.react:flipper-integration")
111110

112111
if (hermesEnabled.toBoolean()) {
113112
implementation("com.facebook.react:hermes-android")

0 commit comments

Comments
 (0)