owner
stringclasses
5 values
repo
stringclasses
6 values
id
int64
18.6M
4.16B
issue_number
int32
1
147k
author
stringlengths
0
39
body
stringlengths
1
260k
created_at
timestamp[us]date
2000-06-06 02:40:44
2026-03-30 19:21:35
updated_at
timestamp[us]date
2000-06-06 02:40:44
2026-03-30 19:24:42
reactions
unknown
author_association
stringclasses
7 values
facebook
react
18,859,687
48
vjeux
Add subtitles otherwise people won't bother reading 20 paragraphs Would be nice to add illustrations/examples ofthe rendering phases so it's not only text Nit: the author is being written as is, you want to put Pete Hunt
2013-06-03T18:10:15
2013-06-03T18:10:15
{}
CONTRIBUTOR
facebook
react
18,859,163
47
petehunt
Ah, now I get what you meant by `gettext`-style. That sounds like a pretty good idea to me.
2013-06-03T18:02:15
2013-06-03T18:02:15
{}
CONTRIBUTOR
facebook
react
18,859,081
47
edc
I like @zpao's proposal. The `_dom_` could simply be a syntactical "escape", and the JSX transform can treat the argument of `_dom_` as a string literal instead of an expression and therefore bypass the performance implications and XSS issues. The JSX transform can simply abort if the argument of `_dom_` is not a string literal.
2013-06-03T18:01:00
2013-06-03T18:01:00
{}
NONE
facebook
react
18,858,910
1
petehunt
:+1:
2013-06-03T17:58:24
2013-06-03T17:58:24
{}
CONTRIBUTOR
facebook
react
18,858,807
1
benjamn
@petehunt good question. I believe jstest actually creates a new window environment for each test, which would mean that the `<iframe>` strategy is as close as we can get in a real browser: https://phabricator.fb.com/diffusion/E/browse/tfb/trunk/www/scripts/third_party/jstest/runner/run-single-jstest.js So I think/hope that we will have fewer disagreements between phantom and jstest. It's still masking the fact that `dumpCache` doesn't work the same way, yes. But making `dumpCache` work would require rewriting the module system that Browserify uses. That's not out of the question by any means, but right now it's nice to be testing the same imperfect module system that we ship in production Browserify bundles. cc @jeffmo who might know better
2013-06-03T17:56:53
2013-06-03T17:56:53
{}
CONTRIBUTOR
facebook
react
18,858,724
47
zpao
Well, that's not really better, it's just writing the JSX transform yourself. Which sucks (otherwise we wouldn't have JSX at all). And if we ever decide to change the output of the transform things are going to fail weirdly. What @edc is proposing is nice in that since it's _just JS_, things like coffeescript can parse it and not choke. What we could _maybe_ do is have the JSX transform step look for this `_dom_` method and parse the contents, turning it into Reacty code. The only additional bytes are then in the transformer, which isn't bad.
2013-06-03T17:55:37
2013-06-03T17:55:37
{}
MEMBER
facebook
react
18,858,287
42
zpao
Yea, we can get some RSS magic in there. I do this on my blog. I'll add that in and there's some other cleanup I want to do before we actually publish this.
2013-06-03T17:48:38
2013-06-03T17:48:38
{}
MEMBER
facebook
react
18,857,922
1
petehunt
I like this much better than our current test system. But isn't it masking the fact that dumpCache() doesn't work consistently between our phantom and jstest test runners? I think that's why we had the original issue where the reactRoot count was not reset when running in phantom. Doesn't that mean that some tests will pass in phantom (because they're better isolated) and fail in jstest?
2013-06-03T17:43:01
2013-06-03T17:43:01
{}
CONTRIBUTOR
facebook
react
18,857,724
1
zpao
A++, merge away when you're ready
2013-06-03T17:39:44
2013-06-03T17:39:44
{}
MEMBER
facebook
react
18,857,599
42
petehunt
Can jekyll give us some kind of magic RSS feed? That would be pretty cool in case an aggregator wants us. But I guess we could do that later; this looks fine to me right now. If everyone's on board let's do it.
2013-06-03T17:37:39
2013-06-03T17:37:39
{}
CONTRIBUTOR
facebook
react
18,713,639
28
alvaromuir
Thanks guys. A single 'React' would be sweet imho. On Thu, May 30, 2013 at 4:58 PM, Paul O’Shannessy notifications@github.comwrote: > What @petehunt https://github.com/petehunt said should work, though it > exposes more than you need and might lead to information overload (just > look at React.js if you do this! this is what gets exposed by the shipping > file). > > I was hoping the UMD wrapper we have around react.js would _just work_ if > you decided to require('React'); (or maybe it's require('react'); If > neither of those work then we should definitely try to make this work out > of the box without having to do a custom build. > > — > Reply to this email directly or view it on GitHubhttps://github.com/facebook/react/issues/28#issuecomment-18707918 > .
2013-05-30T22:52:50
2013-06-03T17:35:54
{}
NONE
facebook
react
18,856,399
38
zpao
We're still working out the kinks but let's just merge this in and figure out the rest later. We'll never overwrite history in this repo so there will always be record of it :) Thanks Cam!
2013-06-03T17:19:13
2013-06-03T17:19:13
{}
MEMBER
facebook
react
18,822,229
28
benjamn
@zpao you mean we should modify browserify so that it generates something that works as an AMD module? RequireJS does have the ability to load modules on demand, which is a different sort of philosophy from the monolithic package that browserify produces. Both approaches can be worthwhile, and it should be easy to support both. We've just implicitly preferred the monolithic package approach so far.
2013-06-03T05:08:15
2013-06-03T05:12:09
{}
CONTRIBUTOR
facebook
react
18,843,177
40
aarongrando
This works, thanks tremendously.
2013-06-03T14:04:09
2013-06-03T14:04:09
{}
NONE
facebook
react
18,855,145
28
zpao
> you mean we should modify browserify so that it generates something that works as an AMD module? Yea. If what @jriecken said is right, then we can maybe get UMD changed (https://github.com/ForbesLindesay/umd/blob/master/template.js#L12 is what gets used by browserify and it very much does not provide a name to `define`). Again, I'm not super familiar with RequireJS so maybe we need more. react.js is already React with all the dependencies so I don't think we _need_ to ship a bundle of modules and can stick with the single file so long as it actually works
2013-06-03T16:58:17
2013-06-03T16:58:17
{}
MEMBER
facebook
react
18,817,606
45
zpao
I think it's probably worth some duplication. Readmes should tell you how to install and not just direct you somewhere else. That said making sure it stays current is important.
2013-06-03T00:55:10
2013-06-03T00:55:10
{}
MEMBER
facebook
react
18,820,665
28
jriecken
I think the issue is probably that the shipped `react.js` defines an anonymous module rather than one with the id of 'react'. Unless the file is loaded asynchronously (or merged together with other files using the `r.js` optimizer), a "Mismatched anonymous define()" error will be thrown. This means that currently the `react.js` file cannot be loaded via a normal `<script>` block in an AMD environment. For example, jQuery does this to define itself as an AMD module: ``` // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via a proper concatenation script that // understands anonymous AMD modules. A named AMD is safest and most robust // way to register. Lowercase jquery is used because AMD module names are // derived from file names, and jQuery is normally delivered in a lowercase // file name. Do this after creating the global so that if an AMD module wants // to call noConflict to hide this version of jQuery, it will work. if ( typeof define === "function" && define.amd ) { define( "jquery", [], function () { return jQuery; } ); } ```
2013-06-03T03:39:32
2013-06-03T03:39:32
{}
NONE
facebook
react
18,822,165
28
zpao
Lets reopen this then until we ship something that works with require. We're using browserify with the standalone option (which wraps with UMD) to build a mostly compatible module. I'd like to keep the process as simple as possible so we might want to try to fix this in one of those tools.
2013-06-03T05:05:03
2013-06-03T05:05:03
{}
MEMBER
facebook
react
18,817,328
35
vjeux
Look at #43 and #45 instead
2013-06-03T00:38:39
2013-06-03T00:38:39
{}
CONTRIBUTOR
facebook
react
18,857,108
47
petehunt
@edc what do you think of this? ``` var HelloMessage = React.createClass({ render: function() { return React.DOM.div(null, 'Hello ' + this.props.name); } }); ``` This works out of the box (and is what JSX actually compiles down to). I fear a solution that parses strings because of performance implications, having to include a parser in the core (which is more bytes down the wire) and that it becomes easier to introduce XSS vulnerabilities.
2013-06-03T17:30:53
2013-06-03T17:30:53
{}
CONTRIBUTOR
facebook
react
18,812,073
39
zpao
es5-sham might be able to go away (I don't actually know all the polyfills we need and which live in shim vs sham). I know for sure we need something to completely support IE8. Even if we get rid of this `Object.create` we have some `Array.isArray` in there. We should document this better. Our IE8 testing has been facebook.com :) In general though, if you're making internal changes then you'll need to rebuild to test. `grunt build` builds debug and minified builds - you can skip the minified step by just run `grunt build:basic`, might make that cycle a little faster. You could also run the automated tests in browser with `grunt test --debug` which should start a server which you can hit from any browser. This doesn't help the shim issue though, so probably won't be much use in IE8. Having a no-build way to test would be smart. I bet we could maybe do it using requirejs or maybe a node server that just builds react.js on demand... but for now building is the only option.
2013-06-02T19:25:56
2013-06-02T19:25:56
{}
MEMBER
facebook
react
18,800,365
38
camspiers
Sounds good :)
2013-06-02T01:45:13
2013-06-02T01:45:13
{}
CONTRIBUTOR
facebook
react
18,808,536
40
zpao
Indeed. This is deceptive and you got a _really_ bad error message. We need to fix that (amongst other things). Right now scripts need to be prefixed with a docblock to assist the transformer. The fact that it's missing here is causing it to not recognize that it should be converting to JSX. We very much want to fix this ASAP. Sorry that it's causing you issues! In the mean time, just prefixing your code with this docblock should fix your problem. Please close this out if it does. ``` /** * @jsx React.DOM */ ``` or the condensed version will work too ``` /** @jsx React.DOM */ ```
2013-06-02T16:05:05
2013-06-02T16:05:05
{}
MEMBER
facebook
react
18,800,351
38
petehunt
Thanks @camspiers ! This is ready to go in. I actually want to wait until @zpao is around to merge (he's the one who is working on our internal<->github stuff). src/ gets synced back and forth from our internal repo, so I don't want your pull to go in here and then somehow get overwritten when the sync happens (that way you keep attribution). @zpao knows how this works though. Thanks!
2013-06-02T01:43:55
2013-06-02T01:43:55
{}
CONTRIBUTOR
facebook
react
18,808,623
39
zpao
Turns out that `Object.create` in NormalizedEventListener is actually causing some bugs, so we just changed that internally. We're still working out the kinks to our code sync process but that should be making it's way to master soon. In the meantime, if having es5shim+sham on the site would help, we can make that happen.
2013-06-02T16:10:52
2013-06-02T16:10:52
{}
MEMBER
facebook
react
18,811,534
39
sophiebits
I can't tell from your answer whether that means that es5-sham should be used and its presence can be relied upon, or if it should go away completely once the code sync happens. Having the shims on the site might help. How have you been testing in IE8? (Also in general – I've been repeatedly running `grunt build` then using the examples to test but maybe there's some good way of loading React that doesn't require the explicit build step?)
2013-06-02T18:53:49
2013-06-02T18:53:49
{}
COLLABORATOR
facebook
react
18,800,194
38
petehunt
Change looks fine, if you can just put them in alphabetical order with the rest of the DOM properties I can merge.
2013-06-02T01:26:26
2013-06-02T01:26:26
{}
CONTRIBUTOR
facebook
react
18,799,520
32
petehunt
@spicyj this is awesome and going to be a huge improvement to the framework. I've been wanting to do this for a while. The overall structure of this code is great. Thanks for making it a new event plugin. We don't have a precedent for doing the deferred stuff yet. I'd want @jordow's opinion on how to go about that. But we may be able to make this work without deferring. I am noticing that the events we need to defer are cut, paste, and keyDown. What if instead we got rid of those and just used keyUp and click and threw out all of the deferred stuff? While it'll be slightly slower (waiting for keyUp to reconcile rather than doing it immediately on keyDown), I think it gets us 90% of the way there without forcing us to introduce this deferred concept. Remember, since this is React, reconciles are generally considered cheap so if we trigger a few extra input events even though the content hasn't changed our reconciler will figure it out and make it a no-op. Finally, I'd like to get test coverage on the event plugin. If you feel like tackling it, great, but I'm comfortable taking this pull without one and I can add a test case upstream. @ide @yungsters @jordow whatcha think?
2013-06-02T00:19:47
2013-06-02T00:19:47
{}
CONTRIBUTOR
facebook
react
18,799,663
32
jordwalke
@spicyj You keep reading my mind. I'll take a closer look at this tonight.
2013-06-02T00:33:14
2013-06-02T00:33:14
{}
CONTRIBUTOR
facebook
react
18,799,334
32
sophiebits
Here's a stab at using the synthetic event system to simulate onInput in all browsers, including IE8. Unlike the real input event, this one can get triggered multiple times for the same change and sometimes in cases where there wasn't any input. The only way I can think of to handle this is to store the old value on the DOM element so that we can compare and trigger the event only if there's been a change, but that feels sort of gross to me. I'm also unsure of the setTimeout I used, since it seems that setTimeout isn't used anywhere else in the codebase but I don't know of any other way to get the desired effect here since we need to wait for the browser to process the keydown event before the value attribute is updated. I did verify that when deferring, the AbstractEvent is still released after the event handlers are run. Let me know what you think.
2013-06-02T00:01:23
2013-06-02T00:01:23
{}
COLLABORATOR
facebook
react
18,798,158
37
jordwalke
Good call.
2013-06-01T22:24:46
2013-06-01T22:24:46
{}
CONTRIBUTOR
facebook
react
18,796,026
35
petehunt
fix that up and we'll merge
2013-06-01T20:00:14
2013-06-01T20:00:14
{}
CONTRIBUTOR
facebook
react
18,782,745
30
petehunt
@vjeux can you send out a pull to add this to the docs somewhere?
2013-06-01T03:18:44
2013-06-01T03:18:44
{}
CONTRIBUTOR
facebook
react
18,782,766
35
zpao
Good enough for me for now.
2013-06-01T03:20:31
2013-06-01T03:20:31
{}
MEMBER
facebook
react
18,715,663
30
vjeux
http://jsfiddle.net/vjeux/25Rhk/ Here's how the new base fiddle
2013-05-30T23:47:03
2013-06-01T03:17:05
{}
CONTRIBUTOR
facebook
react
18,782,730
30
jeffreylin
@vjeux - cool - uploaded to http://fb.me/react-js-fiddle-integration.js - appears to work! =] http://jsfiddle.net/MmRXB/2/
2013-06-01T03:16:57
2013-06-01T03:16:57
{}
CONTRIBUTOR
facebook
react
18,782,727
30
vjeux
Thanks!
2013-06-01T03:16:34
2013-06-01T03:16:34
{}
CONTRIBUTOR
facebook
react
18,782,674
30
vjeux
Something like: http://fb.me/react-js-fiddle-integration.js I don't really care about the name as long as you give me the final url
2013-06-01T03:10:54
2013-06-01T03:10:54
{}
CONTRIBUTOR
facebook
react
18,782,657
30
jeffreylin
This lgtm - I can just toss it on fb.me if you want - lmk what URI you want. Also fwiw, it doesn't have to be the final version - we can always change where the fb.me URI points.
2013-06-01T03:09:04
2013-06-01T03:09:21
{}
CONTRIBUTOR
facebook
react
18,782,652
30
petehunt
@zpao where should this file live? Definitely not docs/js. Maybe docs/_js
2013-06-01T03:08:38
2013-06-01T03:08:38
{}
CONTRIBUTOR
facebook
react
18,782,642
30
vjeux
Ping
2013-06-01T03:07:06
2013-06-01T03:07:06
{}
CONTRIBUTOR
facebook
react
18,774,755
31
jordwalke
You read my mind!
2013-05-31T22:21:16
2013-05-31T22:21:16
{}
CONTRIBUTOR
facebook
react
18,766,572
32
sophiebits
@jordow Sorry, I'm not. (Happy to talk on IRC or something though!)
2013-05-31T19:27:31
2013-05-31T19:27:31
{}
COLLABORATOR
facebook
react
18,761,250
32
jordwalke
@spicyj Are you at jsconf this week? It would be great to talk about some cool things we can do with this across browsers.
2013-05-31T18:00:35
2013-05-31T18:00:35
{}
CONTRIBUTOR
facebook
react
18,733,234
33
sophiebits
Done.
2013-05-31T08:47:20
2013-05-31T08:47:20
{}
COLLABORATOR
facebook
react
18,724,116
18
petehunt
@jordow I have a mixin that does this for IG that I want to get into react_contrib. This is probably a good idea for us to do, however if we use React.autoBind() on the function passed to setInterval() it'll suppress the errors when the component unmounts. I'm pretty sure that killing the setInterval() is better though. I'm inclined to take this (once rebased) if everyone's OK with it.
2013-05-31T05:34:07
2013-05-31T05:34:07
{}
CONTRIBUTOR
facebook
react
18,723,968
33
petehunt
Ah there's a bug in the tutorial; can you add a "return false" to handleSubmit and document that as well? Thanks.
2013-05-31T05:26:07
2013-05-31T05:26:07
{}
CONTRIBUTOR
facebook
react
18,723,944
32
petehunt
BTW, I am super stoked to get rid of all the keyUp's in the examples! You rock, thanks for finding high-leverage fixes.
2013-05-31T05:24:45
2013-05-31T05:24:45
{}
CONTRIBUTOR
facebook
react
18,723,856
31
petehunt
Yep this is definitely better. This was a hackathon project and still shows in some places :P
2013-05-31T05:19:55
2013-05-31T05:19:55
{}
CONTRIBUTOR
facebook
react
18,723,690
27
seiffert
I already signed the CLA!
2013-05-31T05:11:13
2013-05-31T05:11:13
{}
CONTRIBUTOR
facebook
react
18,721,388
31
sophiebits
Indeed -- just rebased.
2013-05-31T03:20:45
2013-05-31T03:20:45
{}
COLLABORATOR
facebook
react
18,720,654
16
mz121star
@zpao thanks, I get it. react is gorgeous !
2013-05-31T02:48:35
2013-05-31T02:48:35
{}
NONE
facebook
react
18,719,603
31
zpao
These look good to me - I think this better conveys the idea that modifying `this.state` isn't great. Effectively they're the same since we call `setState` anyway. It looks like @petehunt actually modified these examples since you pulled, so it's probably worth rebasing to make sure you're working from the latest copy
2013-05-31T02:06:50
2013-05-31T02:06:50
{}
MEMBER
facebook
react
18,718,944
27
jeffmo
This looks good to after we clear up line 39 -- thanks a ton for the fix!
2013-05-31T01:40:32
2013-05-31T01:42:24
{}
CONTRIBUTOR
facebook
react
18,715,998
30
vjeux
I just mailed Piotr Zalewa the author of JSFiddle about the issue.
2013-05-30T23:57:11
2013-05-30T23:57:11
{}
CONTRIBUTOR
facebook
react
18,715,757
30
vjeux
Using JS1.7 we lose syntax highlighting unfortunately. We can already make it work with the normal Javascript but since the code is executed it displays a javascript error every time you run it. I haven't found a way to make that parsing error go away without also losing syntax highlighting :(
2013-05-30T23:49:41
2013-05-30T23:49:41
{}
CONTRIBUTOR
facebook
react
18,715,303
27
jeffmo
Aha you're right! It's because we move past the contents of the object literal in the displayName transform step before the react.js transform has a chance to run on the declaration node. Ok, do you mind filling out our CLA and then I can merge this in for you: https://developers.facebook.com/opensource/cla
2013-05-30T23:37:14
2013-05-30T23:37:14
{}
CONTRIBUTOR
facebook
react
18,714,404
30
jeffreylin
Okay cool - I guess as long we tell people to fork off that JSFiddle, it should be good. =D Maybe add an alert("Requires the Javascript 1.7 language in JSFiddle.") to the script if it can't find the script tag - just incase people copy pasta the script src.
2013-05-30T23:12:34
2013-05-30T23:12:34
{}
CONTRIBUTOR
facebook
react
18,714,012
30
vjeux
Let me update it so we have to put /*\* @jsx React.DOM */ in the code instead of having the script automatically inserting it.
2013-05-30T23:02:22
2013-05-30T23:02:22
{}
CONTRIBUTOR
facebook
react
18,713,559
30
vjeux
This would be ideal indeed, but meanwhile this is a working solution
2013-05-30T22:50:52
2013-05-30T22:50:52
{}
CONTRIBUTOR
facebook
react
18,713,503
30
zpao
This might be OK to do short term, but we should do our best to get JSX to a point where we can ask to add JSX to the language choices.
2013-05-30T22:49:17
2013-05-30T22:49:17
{}
MEMBER
facebook
react
18,713,353
30
vjeux
We can't make it work with the default language unfortunately. It is a &lt;script> tag that executes automatically. We need to use Javascript1.7 or CoffeeScript. The goal is to provide a HelloWorld JSFiddle that people can modify and fork that is properly configured.
2013-05-30T22:46:02
2013-05-30T22:46:33
{}
CONTRIBUTOR
facebook
react
18,713,281
25
zpao
Thanks Martin! I'll take a look at this soon, we've just been following up with some other issues today. Not forgotten though :)
2013-05-30T22:44:12
2013-05-30T22:44:12
{}
MEMBER
facebook
react
18,713,017
30
jeffreylin
FWIW, I think the selector is fragile - In the languages selector on the left in jsfiddle, you can pick between JS, JS1.7, and Coffeescript - I think this script only works for the JS1.7 option... I wouldn't merge this unless we're sure this works on al "language" options or at least the one out of the box w/ a message - tbh I think the one out of the box is regular JS and not JS1.7.
2013-05-30T22:38:16
2013-05-30T22:39:36
{}
CONTRIBUTOR
facebook
react
18,713,031
30
jeffreylin
@petehunt sure thing
2013-05-30T22:38:35
2013-05-30T22:38:35
{}
CONTRIBUTOR
facebook
react
18,713,004
30
petehunt
@jeffreylin can you take this one for CDN stuff?
2013-05-30T22:37:57
2013-05-30T22:37:57
{}
CONTRIBUTOR
facebook
react
18,713,003
27
seiffert
I tried to reproduce the problem with the `jsx` binary - it does not occur! WIth the version of `JSXTransformer.js` installed via `bower install react`, the problem can be reproduced...
2013-05-30T22:37:56
2013-05-30T22:37:56
{}
CONTRIBUTOR
facebook
react
18,710,111
27
seiffert
@jeffmo Could you please try to make `render` return a DOM component? The transformation of this JSX code to javascript is what doesn't work for me... The transformation should happen in [browser-transforms.js on line 39](https://github.com/facebook/react/blob/master/vendor/browser-transforms.js#L39). However, after executing this line, the variable `functionBody` holds the string contained in this gist: [https://gist.github.com/seiffert/5681370](https://gist.github.com/seiffert/5681370). What is happening is that the `reactDisplayName` visitor iterates over all declarations included in the `var`. As far as I understand, it should only add the component's `displayName` property to its initializer's first argument. What it actually does is the following: For every declaration, it copies the script from the current pointer to the first argument of the declaration's initializer into the script buffer. However, this step copies all contents from the last declaration's initializer's first argument's position (stored in `state.g.position`) to the current declaration's initializer's first argument into the buffer. This effectively copies the whole untransformed initializer into the script buffer. After this, the normal transformation takes place which leads to the correct but somehow ~duplicate output at the bottom... Yes, I do have a `@jsx React.DOM` tag in the docblock at the top of my `<script>` tag - see the whole HTML document [here](https://gist.github.com/seiffert/5681270).
2013-05-30T21:37:00
2013-05-30T21:37:00
{}
CONTRIBUTOR
facebook
react
18,708,046
27
jeffmo
Hmm, I'm having a hard time reproing this issue... I made repro.js: ``` /** * @jsx React.DOM */ var CommentBox = React.createClass({render: function() {}}), CommentList = React.createClass({render: function() {}}); ``` and when I run `./bin/jsx repro.js` I get this: ``` /** * @jsx React.DOM */ var CommentBox = React.createClass({displayName: 'CommentBox',render: function() {}}), CommentList = React.createClass({displayName: 'CommentList',render: function() {}}); ``` Did you include the "@jsx" tag in the docblock at the top? Or maybe I'm missing something?
2013-05-30T21:00:27
2013-05-30T21:00:27
{}
CONTRIBUTOR
facebook
react
18,707,918
28
zpao
What @petehunt said should work, though it exposes more than you need and might lead to information overload (just look at React.js if you do this! this is what gets exposed by the shipping file). I was hoping the UMD wrapper we have around react.js would _just work_ if you decided to `require('React');` (or maybe it's `require('react');` If neither of those work then we should definitely try to make this work out of the box without having to do a custom build.
2013-05-30T20:58:40
2013-05-30T20:58:40
{}
MEMBER
facebook
react
18,707,621
28
petehunt
We run React+RequireJS on Instagram. Check out the repo and run `grunt`. Then under build/ you'll have a bunch of CommonJS modules that RequireJS can use via its `r.js` tool. Does that answer your question?
2013-05-30T20:53:57
2013-05-30T20:53:57
{}
CONTRIBUTOR
facebook
react
18,704,645
27
seiffert
And: I would really be interested in this bookmarklet! :)
2013-05-30T20:05:50
2013-05-30T20:05:50
{}
CONTRIBUTOR
facebook
react
18,704,621
27
seiffert
Oh actually I'm not using displayName myself, the page just won't render because javascript dies with an `Uncaught SyntaxError: Unexpected token <`. The output of fbtransform still contains tag literals: ``` javascript var CommentBox = React.createClass({ ... }), CommentList = React.createClass({ render: function() { var comments = this.props.data.map(function (comment) { return <Comment author={comment.author}>{comment.text}</Comment>; }); return ( <div class="commentList"> {comments} </div> ); } }); ``` (the body of CommentBox is omitted since it is transformed correctly.)
2013-05-30T20:05:27
2013-05-30T20:05:27
{}
CONTRIBUTOR
facebook
react
18,704,137
27
jordwalke
:like: I hadn't considered this case. I'm curious how you are using the displayName. We have a bookmarklet that will annotate the page with visual labels on top of the DOM that tell you the names of the components that generated that part of the page. I'll see if we can get that checked in.
2013-05-30T19:57:44
2013-05-30T19:57:44
{}
CONTRIBUTOR
facebook
react
18,702,156
26
zpao
0.3.1 pushed to npm: https://npmjs.org/package/react-tools
2013-05-30T19:23:46
2013-05-30T19:23:46
{}
MEMBER
facebook
react
18,700,683
16
zpao
@mz121star It's an unfortunate side effect of releasing parts of the FB/Instagram infrastructure. That's how we do it internally and we didn't have enough time to clean up and get rid of it. That's very high on our list of things to do now that we've launched. @andreypopp Nice! Cool to see that happening :) I'll push out the npm update shortly.
2013-05-30T18:59:11
2013-05-30T18:59:11
{}
MEMBER
facebook
react
18,700,358
21
zpao
Good call. Updating now.
2013-05-30T18:53:40
2013-05-30T18:53:40
{}
MEMBER
facebook
react
18,699,600
23
zpao
:thumbsup:
2013-05-30T18:41:30
2013-05-30T18:41:30
{}
MEMBER
facebook
react
18,699,015
15
martinbean
Updated pull request: #25.
2013-05-30T18:32:31
2013-05-30T18:32:31
{}
AUTHOR
facebook
react
18,698,556
15
martinbean
OK. New Pull Request will be coming in just a few moments!
2013-05-30T18:25:22
2013-05-30T18:25:22
{}
AUTHOR
facebook
react
18,698,174
15
zpao
Yea, a separate pull request against `master` is probably best. I don't think GH lets you repurpose a pull request against a different branch. We'll then update `gh-pages` separately (so far we've rolled up multiple changes into one commit there)
2013-05-30T18:19:03
2013-05-30T18:19:03
{}
MEMBER
facebook
react
18,697,945
19
petehunt
@seiffert thanks for this! You're totally right. I added it in the committed example but didn't update the docs: https://github.com/petehunt/react-tutorial/blob/master/scripts/example.js
2013-05-30T18:15:35
2013-05-30T18:15:35
{}
CONTRIBUTOR
facebook
react
18,697,236
18
zpao
On GitHub it won't be - we customized markdown processing a little bit to enable it on the website. That customization actually breaks the highlighting on Github since it's a custom extension. See it in action: http://facebook.github.io/react/docs/tutorial.html
2013-05-30T18:03:52
2013-05-30T18:03:52
{}
MEMBER
facebook
react
18,696,726
18
lguzzon
@benjamn You are rigth ... a got a Typo error ... now fixing @zpao I see that the rendered markdown with brackets is not highlighted isn't it?
2013-05-30T17:51:42
2013-05-30T17:51:42
{}
AUTHOR
facebook
react
18,696,386
18
zpao
Also, please don't remove the brackets on the code fences. This is what allows us to do line highlighting and call out specific changes in the tutorial.
2013-05-30T17:34:49
2013-05-30T17:34:49
{}
MEMBER
facebook
react
18,696,235
17
zpao
Good catch!
2013-05-30T17:32:38
2013-05-30T17:32:38
{}
MEMBER
facebook
react
18,695,761
19
zpao
@seiffert Thanks! And thanks for already signing the CLA :) @petehunt I'm going to let you take this since the tutorial is mostly your baby and you would know best if you forgot some code or if this is the best route.
2013-05-30T17:25:40
2013-05-30T17:25:40
{}
MEMBER
facebook
react
18,695,357
15
martinbean
Hi Paul. No problem. I realised the docs were built with Jekyll, I just generated the site, and created a pull request of the generated files in the `gh-pages` branch and not modifications to the raw files in the `master` branch. So not an issue with communication but more a “D’oh!” moment from me. How would you like me to proceed? Create a separate pull request containing my changes to the docs’ raw files in the `master` branch? Will you then generate/update the `gh-pages` branch from there?
2013-05-30T17:20:11
2013-05-30T17:20:11
{}
AUTHOR
facebook
react
18,695,119
15
zpao
Whoa! First off, thanks for diving into this. And also for already signing the CLA :) Secondly (and this is totally on us for not communicating it well): we actually have our site being built with Jekyll and keep the raw files in the master branch @ https://github.com/facebook/react/tree/master/docs (there's a readme there for getting set up in case you aren't familiar with Ruby/Jekyll). Since we build from that, it's important that changes to documentation are actually made there, and then we compile that and check it into the gh-pages branch.
2013-05-30T17:16:51
2013-05-30T17:16:51
{}
MEMBER
facebook
react
18,678,418
16
andreypopp
@mz121star as I understood, there can be only single comment (pragma?) at the top of a file. P.S. I also don't like placing pragmas in my source code so I've built [reactify](https://github.com/andreypopp/reactify) source transform for browserify which transforms JSX files with `.jsx` extension into JS code. Though it doesn't work yet with `react-tools` from npm due to #10 (fixed but needs to be released on npm).
2013-05-30T13:01:10
2013-05-30T13:01:10
{}
CONTRIBUTOR
facebook
react
18,675,135
14
petehunt
@xcambar they definitely are internally, we should look into moving in that direction externally as well. This should be a good start though.
2013-05-30T11:40:39
2013-05-30T11:40:39
{}
CONTRIBUTOR
facebook
react
18,672,779
14
xcambar
**Maybe** React and JSX should be split in 2 separate projects, to clarify even further the separation.
2013-05-30T10:37:10
2013-05-30T10:37:10
{}
facebook
react
18,660,385
10
jriecken
Yeah, doesn't look like there's even a `build` directory there. :)
2013-05-30T04:03:35
2013-05-30T04:03:35
{ "+1": 1 }
NONE
facebook
react
18,660,323
10
zpao
Nope, that alone won't do it, we're not even packaging. I totally screwed up the node module :( Fix soon!
2013-05-30T04:01:21
2013-05-30T04:01:21
{}
MEMBER
facebook
react
18,660,129
10
zpao
Bah, I changed build filenames last minute and didn't properly test the module after :( Thanks for finding this! I guess we should write some tests for the node module too, not just our phantomjs tests. (Very) Short term, you should be able to change `./build/React` to `./build/react` and that will fix the problem. @benjamn - I guess it's time to figure out what we want to do with npm versions vs library versions. Should we just bump them both for the time being?
2013-05-30T03:53:16
2013-05-30T03:53:16
{}
MEMBER
facebook
react
18,653,209
9
zpao
Awesome. Thanks again!
2013-05-29T23:40:03
2013-05-29T23:40:03
{}
MEMBER
facebook
react
18,653,150
9
christianroman
It's done, I signed the CLA
2013-05-29T23:38:35
2013-05-29T23:38:35
{}
CONTRIBUTOR
facebook
react
18,643,992
2
yungsters
Looks good, thanks for fixing!
2013-05-29T20:32:19
2013-05-29T20:32:19
{}
CONTRIBUTOR
facebook
react
18,653,027
9
zpao
Nice catch! This is what happens when we're all on little sleep. For now we need all contributors to have a CLA on file. I didn't find one for you so I just need to make sure that you've done that at https://developers.facebook.com/opensource/cla. Let me know when it's done and I'll merge this in. Thanks a lot!
2013-05-29T23:34:49
2013-05-29T23:34:49
{}
MEMBER
facebook
react
19,176,162
76
zpao
I can see why that would cause issues… The way you're thinking about sounds like common sense so I hope that's actually true and that we're just firing these callbacks in the wrong order. So _I_ agree, but that's without looking at the code closely
2013-06-09T23:32:03
2013-06-09T23:32:03
{}
MEMBER