diff --git a/releases/next/docs/communication-android.html b/releases/next/docs/communication-android.html
index ab46a974839..5076c96a6d0 100644
--- a/releases/next/docs/communication-android.html
+++ b/releases/next/docs/communication-android.html
@@ -14,8 +14,7 @@
}
};
}
-}
'use strict';
-
+}
import React from 'react';
import {
AppRegistry,
diff --git a/releases/next/docs/communication-ios.html b/releases/next/docs/communication-ios.html
index c63a48a5317..e6eacc427f8 100644
--- a/releases/next/docs/communication-ios.html
+++ b/releases/next/docs/communication-ios.html
@@ -5,8 +5,7 @@ NSDictionary *props *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"ImageBrowserApp"
- initialProperties:props];
'use strict';
-
+ initialProperties:props];
import React from 'react';
import {
AppRegistry,
diff --git a/releases/next/docs/contributing.html b/releases/next/docs/contributing.html
index a00c9376aae..3a29a751fca 100644
--- a/releases/next/docs/contributing.html
+++ b/releases/next/docs/contributing.html
@@ -10,7 +10,7 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
- */
If you've added a new module, add a @providesModule <moduleName> at the end of the comment. This will allow the haste package manager to find it.
Contributor License Agreement (CLA) #
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, the Facebook GitHub Bot will reply with a link to the CLA form. You may also complete your CLA here.
What happens next? #
The core team will be monitoring for pull requests. Read what to expect from maintainers to understand what may happen after you open a pull request.
Style Guide #
Our linter will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running npm run lint.
However, there are still some styles that the linter cannot pick up.
Code Conventions #
General #
- Most important: Look around. Match the style you see used in the rest of the project. This includes formatting, naming things in code, naming things in documentation.
- Add trailing commas,
- 2 spaces for indentation (no tabs)
- "Attractive"
JavaScript #
- Use semicolons;
'use strict';- Prefer
' over " - Do not use the optional parameters of
setTimeout and setInterval - 80 character line length
JSX #
- Prefer
" over ' for string literal props - When wrapping opening tags over multiple lines, place one prop per line
{} of props should hug their values (no spaces)- Place the closing
> of opening tags on the same line as the last prop - Place the closing
/> of self-closing tags on their own line and left-align them with the opening <
Objective-C #
- Space after
@property declarations - Brackets on every
if, on the same line - method, @interface, and @implementation brackets on the following line- Try to keep it around 80 characters line length (sometimes it's just not possible...)
* operator goes with the variable name (e.g. NSObject *variableName;)
Java #
- If a method call spans multiple lines closing bracket is on the same line as the last argument.
- If a method header doesn't fit on one line each argument goes on a separate line.
- 100 character line length
Documentation #
- Do not wrap lines at 80 characters - configure your editor to soft-wrap when editing documentation.
License #
By contributing to React Native, you agree that your contributions will be licensed under its BSD license.
Improve this page by sending a pull request!