Move can i use decorators to its own file

This commit is contained in:
Kristofer Selbekk
2018-10-07 19:55:33 +02:00
parent 44e485452c
commit 8bcfcc4bb6
3 changed files with 21 additions and 17 deletions

View File

@@ -0,0 +1,18 @@
---
id: can-i-use-decorators
title: Can I Use Decorators?
---
Some popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.<br>
Create React App intentionally doesnt support decorator syntax at the moment because:
- It is an experimental proposal and is subject to change (in fact, it has already changed once, and will change again).
- Most libraries currently support only the old version of the proposal — which will never be a standard.
However in many cases you can rewrite decorator-based code without decorators just as fine.<br>
Please refer to these two threads for reference:
- [#214](https://github.com/facebook/create-react-app/issues/214)
- [#411](https://github.com/facebook/create-react-app/issues/411)
Create React App will add decorator support when the specification advances to a stable stage.

View File

@@ -11,7 +11,6 @@ You can find the most recent version of this guide [here](https://github.com/fac
## Table of Contents
- [Can I Use Decorators?](#can-i-use-decorators)
- [Fetching Data with AJAX Requests](#fetching-data-with-ajax-requests)
- [Integrating with an API Backend](#integrating-with-an-api-backend)
- [Node](#node)
@@ -27,22 +26,6 @@ You can find the most recent version of this guide [here](https://github.com/fac
- [Advanced Configuration](#advanced-configuration)
- [Alternatives to Ejecting](#alternatives-to-ejecting)
## Can I Use Decorators?
Some popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.<br>
Create React App intentionally doesnt support decorator syntax at the moment because:
- It is an experimental proposal and is subject to change (in fact, it has already changed once, and will change again).
- Most libraries currently support only the old version of the proposal — which will never be a standard.
However in many cases you can rewrite decorator-based code without decorators just as fine.<br>
Please refer to these two threads for reference:
- [#214](https://github.com/facebook/create-react-app/issues/214)
- [#411](https://github.com/facebook/create-react-app/issues/411)
Create React App will add decorator support when the specification advances to a stable stage.
## Fetching Data with AJAX Requests
React doesn't prescribe a specific approach to data fetching, but people commonly use either a library like [axios](https://github.com/axios/axios) or the [`fetch()` API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) provided by the browser.

View File

@@ -41,6 +41,9 @@
"updating-to-new-releases",
"sending-feedback",
"something-missing"
],
"Frequently Asked Questions": [
"can-i-use-decorators"
]
}
}