Skip to content

Commit 16a63e7

Browse files
authored
Enable Console Logging for playground Apps (#14944)
* Change files * Enable Console Logging for playground Apps * yarn lint fix
1 parent 5f0c221 commit 16a63e7

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Enable Console Logging for playground Apps",
4+
"packageName": "@react-native-windows/cli",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/@react-native-windows/cli/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ Here are the options that `npx @react-native-community/cli run-windows` takes:
110110
| `--direct-debugging` | number | Enable direct debugging on specified port |
111111
| `--no-telemetry` | boolean | Disables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI |
112112
| `-h`, `--help` | boolean | Display help for command |
113+
| `--client-logs` | boolean | Enable plain text JavaScript log streaming for all connected apps |
113114

114115
## Data Collection
115116
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
116117

117-
This data collection notice only applies to the process of running the react-native-windows CLI (i.e. the commands above).
118+
This data collection notice only applies to the process of running the react-native-windows CLI (i.e. the commands above).

packages/playground/Samples/click.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ export default class Bootstrap extends React.Component {
1414

1515
onSmallIncrement = () => {
1616
this.setState({ticker: this.state.ticker + 1});
17+
console.log(' onSmallIncrement !');
1718
};
1819

1920
onMediumIncrement = () => {
2021
this.setState({ticker: this.state.ticker + 10});
22+
console.log(' onMediumIncrement !');
2123
};
2224

2325
onLargeIncrement = () => {
2426
this.setState({ticker: this.state.ticker + 100});
27+
console.log(' onLargeIncrement !');
2528
};
2629

2730
render() {

packages/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.54",
44
"private": true,
55
"scripts": {
6-
"start": "npx @react-native-community/cli start",
6+
"start": "npx @react-native-community/cli start --client-logs",
77
"lint:fix": "rnw-scripts lint:fix",
88
"lint": "rnw-scripts lint",
99
"windows": "npx @react-native-community/cli run-windows"

0 commit comments

Comments
 (0)