Skip to content

Commit 7a2eaa3

Browse files
author
bvaughn
committed
merging all conflicts
2 parents cae4699 + 95e15d0 commit 7a2eaa3

35 files changed

+169
-59
lines changed

README.md

+73
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< HEAD
12
<h1 dir="rtl">نسخه فارسی <a href="https://reactjs.org/">reactjs.org</a></h1>
23

34
<p dir="rtl">
@@ -140,3 +141,75 @@ yarn dev
140141
<p dir="rtl">
141142
محتوایی که در <a href="https://reactjs.org/">reactjs.org</a> قرار می‌گیرد، تخت مجوز CC-BY-4.0 منتشر می‌شود که جزئیات آن در <a href="https://github.com/open-source-explorer/reactjs.org/blob/master/LICENSE-DOCS.md">LICENSE-DOCS.md</a> آمده‌است.
142143
</p>
144+
=======
145+
# reactjs.org
146+
147+
This repo contains the source code and documentation powering [reactjs.org](https://reactjs.org/).
148+
149+
## Getting started
150+
151+
### Prerequisites
152+
153+
1. Git
154+
1. Node: any 12.x version starting with v12.0.0 or greater
155+
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
156+
1. A fork of the repo (for any contributions)
157+
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
158+
159+
### Installation
160+
161+
1. `cd reactjs.org` to go into the project root
162+
1. `yarn` to install the website's npm dependencies
163+
164+
### Running locally
165+
166+
1. `yarn dev` to start the hot-reloading development server (powered by [Gatsby](https://www.gatsbyjs.org))
167+
1. `open http://localhost:8000` to open the site in your favorite browser
168+
169+
## Contributing
170+
171+
### Guidelines
172+
173+
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.
174+
175+
### Create a branch
176+
177+
1. `git checkout main` from any folder in your local `reactjs.org` repository
178+
1. `git pull origin main` to ensure you have the latest main code
179+
1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch
180+
181+
### Make the change
182+
183+
1. Follow the ["Running locally"](#running-locally) instructions
184+
1. Save the files and check in the browser
185+
1. Changes to React components in `src` will hot-reload
186+
1. Changes to markdown files in `content` will hot-reload
187+
1. If working with plugins, you may need to remove the `.cache` directory and restart the server
188+
189+
### Test the change
190+
191+
1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile.
192+
1. Run `yarn check-all` from the project root. (This will run Prettier, ESLint, and Flow.)
193+
194+
### Push it
195+
196+
1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fix header logo on Android`) to stage and commit your changes
197+
1. `git push my-fork-name the-name-of-my-branch`
198+
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
199+
1. Follow GitHub's instructions.
200+
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.
201+
202+
## Translation
203+
204+
If you are interested in translating `reactjs.org`, please see the current translation efforts at [isreacttranslatedyet.com](https://www.isreacttranslatedyet.com/).
205+
206+
207+
If your language does not have a translation and you would like to create one, please follow the instructions at [reactjs.org Translations](https://github.com/reactjs/reactjs.org-translation#translating-reactjsorg).
208+
209+
## Troubleshooting
210+
211+
- `yarn reset` to clear the local cache
212+
213+
## License
214+
Content submitted to [reactjs.org](https://reactjs.org/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/open-source-explorer/reactjs.org/blob/master/LICENSE-DOCS.md) file.
215+
>>>>>>> 95e15d063b205007a92c52efb5311f76ad5a0b6c

content/blog/2013-07-03-community-roundup-4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ Over the past several weeks, members of our team, [Pete Hunt](http://www.petehun
5454

5555
[Tom Occhino](http://tomocchino.com/) implemented Snake in 150 lines with React.
5656

57-
> [Check the source on GitHub](https://github.com/tomocchino/react-snake/blob/main/src/snake.js)
57+
> [Check the source on GitHub](https://github.com/tomocchino/react-snake/blob/master/src/snake.js)
5858
> <figure><a href="https://tomocchino.github.io/react-snake/"><img src="../images/blog/snake.png"></a></figure>

content/blog/2013-08-05-community-roundup-6.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ este.demos.react.todoApp = este.react.create (`/** @lends {React.ReactComponent.
4949
]
5050
```
5151
52-
[Check it out on GitHub...](https://github.com/steida/este-library/blob/main/este/demos/thirdparty/react/start.coffee)
52+
[Check it out on GitHub...](https://github.com/steida/este-library/blob/master/este/demos/thirdparty/react/start.coffee)
5353

5454

5555
## React Stylus Boilerplate {#react-stylus-boilerplate}

content/blog/2013-08-19-use-react-and-jsx-in-python-applications.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ Alternatively, add it into your `requirements` file:
5252

5353
**Dependencies**: PyReact uses [PyExecJS](https://github.com/doloopwhile/PyExecJS) to execute the bundled React code, which requires that a JS runtime environment is installed on your machine. We don't explicitly set a dependency on a runtime environment; Mac OS X comes bundled with one. If you're on a different platform, we recommend [PyV8](https://code.google.com/p/pyv8/).
5454

55-
For the initial release, we've only tested on Python 2.7. Look out for support for Python 3 in the future, and if you see anything that can be improved, we welcome your [contributions](https://github.com/facebook/react-python/blob/main/CONTRIBUTING.md)!
55+
For the initial release, we've only tested on Python 2.7. Look out for support for Python 3 in the future, and if you see anything that can be improved, we welcome your [contributions](https://github.com/facebook/react-python/blob/master/CONTRIBUTING.md)!

content/blog/2013-08-26-community-roundup-7.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ It's been three months since we open sourced React and it is going well. Some st
1616

1717
## Wolfenstein Rendering Engine Ported to React {#wolfenstein-rendering-engine-ported-to-react}
1818

19-
[Pete Hunt](http://www.petehunt.net/) ported the render code of the web version of Wolfenstein 3D to React. Check out [the demo](http://www.petehunt.net/wolfenstein3D-react/wolf3d.html) and [render.js](https://github.com/petehunt/wolfenstein3D-react/blob/main/js/renderer.js#L183) file for the implementation.
19+
[Pete Hunt](http://www.petehunt.net/) ported the render code of the web version of Wolfenstein 3D to React. Check out [the demo](http://www.petehunt.net/wolfenstein3D-react/wolf3d.html) and [render.js](https://github.com/petehunt/wolfenstein3D-react/blob/master/js/renderer.js#L183) file for the implementation.
2020
<figure><a href="http://www.petehunt.net/wolfenstein3D-react/wolf3d.html"><img src="../images/blog/wolfenstein_react.png"></a></figure>
2121

2222

2323
## React & Meteor {#react--meteor}
2424

25-
[Ben Newman](https://twitter.com/benjamn) made a [13-lines wrapper](https://github.com/benjamn/meteor-react/blob/main/lib/mixin.js) to use React and Meteor together. [Meteor](http://www.meteor.com/) handles the real-time data synchronization between client and server. React provides the declarative way to write the interface and only updates the parts of the UI that changed.
25+
[Ben Newman](https://twitter.com/benjamn) made a [13-lines wrapper](https://github.com/benjamn/meteor-react/blob/master/lib/mixin.js) to use React and Meteor together. [Meteor](http://www.meteor.com/) handles the real-time data synchronization between client and server. React provides the declarative way to write the interface and only updates the parts of the UI that changed.
2626

2727
> This repository defines a Meteor package that automatically integrates the React rendering framework on both the client and the server, to complement or replace the default Handlebars templating system.
2828
>

content/blog/2013-11-06-community-roundup-10.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The best part is that no drastic changes have been required to support all those
5252

5353
## TodoMVC Benchmarks {#todomvc-benchmarks}
5454

55-
Webkit has a [TodoMVC Benchmark](https://github.com/WebKit/webkit/tree/main/PerformanceTests/DoYouEvenBench) that compares different frameworks. They recently included React and here are the results (average of 10 runs in Chrome 30):
55+
Webkit has a [TodoMVC Benchmark](https://github.com/WebKit/webkit/tree/master/PerformanceTests/DoYouEvenBench) that compares different frameworks. They recently included React and here are the results (average of 10 runs in Chrome 30):
5656

5757
- **AngularJS:** 4043ms
5858
- **AngularJSPerf:** 3227ms

content/blog/2014-02-05-community-roundup-15.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Fredrik Dyrkell ([@lexicallyscoped](https://twitter.com/lexicallyscoped)) rewrot
103103
104104
In a separate post, Dyrkell breaks down [how to build a binary clock component](http://www.lexicallyscoped.com/2014/01/23/ClojureScript-react-om-binary-clock.html) in Om.
105105

106-
[[Demo](http://www.lexicallyscoped.com/demo/binclock/)] [[Code](https://github.com/fredyr/binclock/blob/main/src/binclock/core.cljs)]
106+
[[Demo](http://www.lexicallyscoped.com/demo/binclock/)] [[Code](https://github.com/fredyr/binclock/blob/master/src/binclock/core.cljs)]
107107

108108
### Time Travel: Implementing undo in Om {#time-travel-implementing-undo-in-om}
109109
David Nolen shows how to leverage immutable data structures to [add global undo](https://swannodette.github.io/2013/12/31/time-travel/) functionality to an app – using just 13 lines of ClojureScript.

content/blog/2014-04-04-reactnet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ReactJS.NET is packaged in NuGet. Simply run `Install-Package React.Mvc4` in the
3030
package manager console or search NuGet for "React" to install it.
3131
[See the documentation](http://reactjs.net/docs) for more information. The
3232
GitHub project contains
33-
[a sample website](https://github.com/reactjs/React.NET/tree/main/src/React.Sample.Mvc4)
33+
[a sample website](https://github.com/reactjs/React.NET/tree/master/src/React.Sample.Mvc4)
3434
demonstrating all of the features.
3535

3636
Let us know what you think, and feel free to send through any feedback and

content/blog/2014-05-06-flux.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ In Flux, the Dispatcher is a singleton that directs the flow of data and ensures
1313

1414
When a user interacts with a React view, the view sends an action (usually represented as a JavaScript object with some fields) through the dispatcher, which notifies the various stores that hold the application's data and business logic. When the stores change state, they notify the views that something has updated. This works especially well with React's declarative model, which allows the stores to send updates without specifying how to transition views between states.
1515

16-
Flux is more of a pattern than a formal framework, so you can start using Flux immediately without a lot of new code. An [example of this architecture](https://github.com/facebook/flux/tree/main/examples/flux-todomvc) is available, along with more [detailed documentation](https://facebook.github.io/flux/docs/overview.html) and a [tutorial](https://facebook.github.io/flux/docs/todo-list.html). Look for more examples to come in the future.
16+
Flux is more of a pattern than a formal framework, so you can start using Flux immediately without a lot of new code. An [example of this architecture](https://github.com/facebook/flux/tree/master/examples/flux-todomvc) is available, along with more [detailed documentation](https://facebook.github.io/flux/docs/overview.html) and a [tutorial](https://facebook.github.io/flux/docs/todo-list.html). Look for more examples to come in the future.

content/blog/2014-06-27-community-roundup-19.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The core concepts React themselves is something very valuable that the community
2525

2626
<iframe width="650" height="315" src="//www.youtube-nocookie.com/embed/KZjFVdU8VLI" frameborder="0" allowfullscreen></iframe>
2727

28-
And don't forget [Pete Hunt](https://github.com/petehunt)'s Wolfenstein 3D rendering engine in React ([source code](https://github.com/petehunt/wolfenstein3D-react/blob/main/js/renderer.js#L183)). While it's nearly a year old, it's still a nice demo.
28+
And don't forget [Pete Hunt](https://github.com/petehunt)'s Wolfenstein 3D rendering engine in React ([source code](https://github.com/petehunt/wolfenstein3D-react/blob/master/js/renderer.js#L183)). While it's nearly a year old, it's still a nice demo.
2929

3030
[![](../images/blog/wolfenstein_react.png)](http://www.petehunt.net/wolfenstein3D-react/wolf3d.html)
3131

content/blog/2014-07-30-flux-actions-and-the-dispatcher.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Flux: Actions and the Dispatcher"
33
author: [fisherwebdev]
44
---
55

6-
Flux is the application architecture Facebook uses to build JavaScript applications. It's based on a unidirectional data flow. We've built everything from small widgets to huge applications with Flux, and it's handled everything we've thrown at it. Because we've found it to be a great way to structure our code, we're excited to share it with the open source community. [Jing Chen presented Flux](http://youtu.be/nYkdrAPrdcw?t=10m20s) at the F8 conference, and since that time we've seen a lot of interest in it. We've also published an [overview of Flux](https://facebook.github.io/flux/docs/overview.html) and a [TodoMVC example](https://github.com/facebook/flux/tree/main/examples/flux-todomvc/), with an accompanying [tutorial](https://facebook.github.io/flux/docs/todo-list.html).
6+
Flux is the application architecture Facebook uses to build JavaScript applications. It's based on a unidirectional data flow. We've built everything from small widgets to huge applications with Flux, and it's handled everything we've thrown at it. Because we've found it to be a great way to structure our code, we're excited to share it with the open source community. [Jing Chen presented Flux](http://youtu.be/nYkdrAPrdcw?t=10m20s) at the F8 conference, and since that time we've seen a lot of interest in it. We've also published an [overview of Flux](https://facebook.github.io/flux/docs/overview.html) and a [TodoMVC example](https://github.com/facebook/flux/tree/master/examples/flux-todomvc/), with an accompanying [tutorial](https://facebook.github.io/flux/docs/todo-list.html).
77

88
Flux is more of a pattern than a full-blown framework, and you can start using it without a lot of new code beyond React. Up until recently, however, we haven't released one crucial piece of our Flux software: the dispatcher. But along with the creation of the new [Flux code repository](https://github.com/facebook/flux) and [Flux website](https://facebook.github.io/flux/), we've now open sourced the same [dispatcher](https://facebook.github.io/flux/docs/dispatcher.html) we use in our production applications.
99

@@ -41,6 +41,6 @@ Problems arise, however, if we have circular dependencies. That is, if Store A n
4141
Example Chat App
4242
----------------
4343

44-
Along with the same dispatcher that Facebook uses in its production applications, we've also published a new example [chat app](https://github.com/facebook/flux/tree/main/examples/flux-chat), slightly more complicated than the simplistic TodoMVC, so that engineers can better understand how Flux solves problems like dependencies between stores and calls to a web API.
44+
Along with the same dispatcher that Facebook uses in its production applications, we've also published a new example [chat app](https://github.com/facebook/flux/tree/master/examples/flux-chat), slightly more complicated than the simplistic TodoMVC, so that engineers can better understand how Flux solves problems like dependencies between stores and calls to a web API.
4545

4646
We're hopeful that the new Flux repository will grow with time to include additional tools, boilerplate code and further examples. And we hope that Flux will prove as useful to you as it has to us. Enjoy!

content/blog/2014-09-24-testing-flux-applications.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ author: [fisherwebdev]
1111
Testing with Jest
1212
-----------------
1313

14-
For a unit test to operate on a truly isolated _unit_ of the application, we need to mock every module except the one we are testing. Jest makes the mocking of other parts of a Flux application trivial. To illustrate testing with Jest, we'll return to our [example TodoMVC application](https://github.com/facebook/flux/tree/main/examples/flux-todomvc).
14+
For a unit test to operate on a truly isolated _unit_ of the application, we need to mock every module except the one we are testing. Jest makes the mocking of other parts of a Flux application trivial. To illustrate testing with Jest, we'll return to our [example TodoMVC application](https://github.com/facebook/flux/tree/master/examples/flux-todomvc).
1515

1616
The first steps toward working with Jest are as follows:
1717

@@ -154,7 +154,7 @@ describe('TodoStore', function() {
154154
});
155155
```
156156

157-
You can take a look at all this code in the [TodoStore's tests on GitHub](https://github.com/facebook/flux/tree/main/examples/flux-todomvc/js/stores/__tests__/TodoStore-test.js) as well.
157+
You can take a look at all this code in the [TodoStore's tests on GitHub](https://github.com/facebook/flux/tree/master/examples/flux-todomvc/js/stores/__tests__/TodoStore-test.js) as well.
158158

159159

160160
Mocking Data Derived from Other Stores
@@ -178,7 +178,7 @@ MyOtherStore.getState.mockReturnValue({
178178

179179
Now we have a collection of objects that will come back from MyOtherStore whenever we call MyOtherStore.getState() in our tests. Any application state can be simulated with a combination of these custom return values and the previously shown technique of working with the store's registered callback.
180180

181-
A brief example of this technique is up on GitHub within the Flux Chat example's [UnreadThreadStore-test.js](https://github.com/facebook/flux/tree/main/examples/flux-chat/js/stores/__tests__/UnreadThreadStore-test.js).
181+
A brief example of this technique is up on GitHub within the Flux Chat example's [UnreadThreadStore-test.js](https://github.com/facebook/flux/tree/master/examples/flux-chat/js/stores/__tests__/UnreadThreadStore-test.js).
182182

183183
For more information about the `mock` property of mocked methods or Jest's ability to provide custom mock values, see Jest's documentation on [mock functions](https://facebook.github.io/jest/docs/mock-functions.html).
184184

content/blog/2015-09-10-react-v0.14-rc1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ These builds are also available in the `react` package on bower.
5757
ReactDOM.render(<MyComponent />, node);
5858
```
5959

60-
We’ve published the [automated codemod script](https://github.com/reactjs/react-codemod/blob/main/README.md) we used at Facebook to help you with this transition.
60+
We’ve published the [automated codemod script](https://github.com/reactjs/react-codemod/blob/master/README.md) we used at Facebook to help you with this transition.
6161

6262
The add-ons have moved to separate packages as well: `react-addons-clone-with-props`, `react-addons-create-fragment`, `react-addons-css-transition-group`, `react-addons-linked-state-mixin`, `react-addons-perf`, `react-addons-pure-render-mixin`, `react-addons-shallow-compare`, `react-addons-test-utils`, `react-addons-transition-group`, and `react-addons-update`, plus `ReactDOM.unstable_batchedUpdates` in `react-dom`.
6363

0 commit comments

Comments
 (0)