
SECRET DOM DO Not USE OR YOU WILL BE FIRED - hathym
https://github.com/facebook/react/blob/80bff5397bf854750dbe7c286f61654ea58938c5/src/umd/ReactUMDEntry.js
======
Artemis2
Explanation on Reddit:
[https://www.reddit.com/r/javascript/comments/3m6wyu/found_th...](https://www.reddit.com/r/javascript/comments/3m6wyu/found_this_line_in_the_react_codebase_made_me/cvcyo4a)

------
nothrabannosir
Question to HN: I'm trying to find the commit that originally added this line.
How do you do this elegantly?

Git blame:

[https://github.com/facebook/react/blame/80bff5397bf854750dbe...](https://github.com/facebook/react/blame/80bff5397bf854750dbe7c286f61654ea58938c5/src/umd/ReactUMDEntry.js)

The last commit for this line:

[https://github.com/facebook/react/commit/d17091ddebf317173eb...](https://github.com/facebook/react/commit/d17091ddebf317173eb30e3ab4a8e28e124c8f50)

It says:

 _src /React.js → src/umd/ReactUMDEntry.js_

and essentially, the line was moved two spots down. Now I want to see the git
blame _before_ this change. Here is where it gets messy...

Best I can think of is go to the parent commit:

[https://github.com/facebook/react/commit/d8ee071c92994879fa8...](https://github.com/facebook/react/commit/d8ee071c92994879fa82ba4d2775b4f38fb78f1d)

Then look for the original file, src/React.js. So I go to "browse files at
this revision", browse to the src/ dir, click React.js, then blame again:

[https://github.com/facebook/react/blame/d8ee071c92994879fa82...](https://github.com/facebook/react/blame/d8ee071c92994879fa82ba4d2775b4f38fb78f1d/src/React.js)

Alright, we're there.

Is there an easier way? This feels very convoluted and hacky...

~~~
Manishearth
Use pickaxe

$ git log -S__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED

commit d17091ddebf317173eb30e3ab4a8e28e124c8f50

Author: Paul O’Shannessy <paul@oshannessy.com>

Date: Thu Mar 24 11:00:38 2016 -0700

    
    
        Make Browserify-specific modules to remove DOM dependencies from npm package
    
    

commit 712199ef9830359c35c1c2442d79676396c06a2d

Author: Jim <jsfb@github>

Date: Mon Oct 5 15:02:34 2015 -0700

    
    
        React -> ReactDOM for render() and findDOMNode()
    
    

commit b2ca3349c27b57b1e9462944cbe4aaaf76783d2b

Author: Paul O’Shannessy <paul@oshannessy.com>

Date: Tue Sep 8 10:13:24 2015 -0700

    
    
        Actually build react-dom file with the build

~~~
timbuckley
Perfect solution!

$ git log -p -S "SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"

------
LukeB_UK
Off topic, but this is the second submission I've seen where the title was all
in caps except "Not" and having just done a test it seems that HN converts
"NOT" to "Not". I'm curious as to why...

Other submission was this one:
[https://news.ycombinator.com/item?id=11411368](https://news.ycombinator.com/item?id=11411368)

~~~
reustle
I think a lot of people like to post NOT in capitals, so they had to implement
this.

Things NOT to do if you are a developer. How NOT to apply for a job.

------
kr0
What is the point of making a private reference to (what I assume) is a public
ReactDOM reference?

~~~
ioquatix
Do not ask these questions you will be fired.

~~~
buremba
Do not make fun of that statement or you will be fired.

------
mrdrozdov
Funny variable name for being part of Facebook's official React repo.

------
nxzero
Anyone able to offer an explanation of what this means?

~~~
miralabs
explanation here
[https://www.reddit.com/r/ProgrammerHumor/comments/3nhk5e/sec...](https://www.reddit.com/r/ProgrammerHumor/comments/3nhk5e/secret_dom_do_not_use_or_you_will_be_fired/)?

~~~
nxzero
Why not just repost an explanation here?

~~~
xomateix
Maybe because the answer is a whole thread that includes comments and other
pieces of context that a simple copy&paste of just an explanation wouldn't
have?

~~~
nxzero
Then that should be the main link.

