-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Migrated to React 0.14.3 #63
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| import './dependencies'; | ||
| import * as React from 'react/addons'; | ||
| import * as React from 'react'; | ||
| import * as ReactDOM from 'react-dom'; | ||
| import App from './components/App'; | ||
| React; // use React as an expression to prevent React being purged from dependencies as not used directly | ||
|
|
||
| React.render(<App />, document.getElementById('content')); | ||
| ReactDOM.render(<App />, document.getElementById('content')); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| import * as React from 'react/addons'; | ||
| import * as React from 'react'; | ||
| import * as TestUtils from 'react-addons-test-utils'; | ||
| import App from '../../src/components/App'; | ||
| import WhoToGreet from '../../src/components/WhoToGreet'; | ||
| import Greeting from '../../src/components/Greeting'; | ||
| import GreetingStore from '../../src/stores/GreetingStore'; | ||
|
|
||
| const { TestUtils } = React.addons; | ||
| React; // use React as an expression to prevent React being purged from dependencies as not used directly | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would just add an explicit import to react: import "react";
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @johnnyreilly with microsoft/TypeScript#6290, this should not be needed now. the React import should be preserved regardless. do you want to send a PR for it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sweet - yes will do @mhegazy |
||
|
|
||
| describe('App', () => { | ||
| it('renders expected HTML', () => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import * as React from 'react/addons'; | ||
| import * as React from 'react'; | ||
| import * as TestUtils from 'react-addons-test-utils'; | ||
| import Greeting from '../../src/components/Greeting'; | ||
| import * as GreetingActions from '../../src/actions/GreetingActions'; | ||
|
|
||
| const { TestUtils } = React.addons; | ||
| React; // use React as an expression to prevent React being purged from dependencies as not used directly | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. import "react";instead ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope |
||
|
|
||
| describe('Greeting', () => { | ||
| let handleSelectionChangeSpy: jasmine.Spy; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import * as React from 'react/addons'; | ||
| import * as React from 'react'; | ||
| import * as TestUtils from 'react-addons-test-utils'; | ||
| import WhoToGreet from '../../src/components/WhoToGreet'; | ||
| import * as GreetingActions from '../../src/actions/GreetingActions'; | ||
|
|
||
| const { TestUtils } = React.addons; | ||
| React; // use React as an expression to prevent React being purged from dependencies as not used directly | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nope |
||
|
|
||
| describe('WhoToGreet', () => { | ||
| let handleSelectionChangeSpy: jasmine.Spy; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just add an explicit import to react:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
Can't find variable: ReactresultsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought
Reactis added to the global scope when you importreact..