Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit e78f5f3

Browse files
committed
Using an imported entity as an expression as suggested by @DanielRosenwasser
1 parent c4ca970 commit e78f5f3

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

es6-babel-react-flux-karma/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import './dependencies';
22
import * as React from 'react';
33
import * as ReactDOM from 'react-dom';
44
import App from './components/App';
5-
const __react = React; // only in place to prevent React being purged from dependencies as not used directly
5+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
66

77
ReactDOM.render(<App />, document.getElementById('content'));

es6-babel-react-flux-karma/test/components/App.tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import App from '../../src/components/App';
44
import WhoToGreet from '../../src/components/WhoToGreet';
55
import Greeting from '../../src/components/Greeting';
66
import GreetingStore from '../../src/stores/GreetingStore';
7-
const __react = React; // only in place to prevent React being purged from dependencies as not used directly
7+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
88

99
describe('App', () => {
1010
it('renders expected HTML', () => {

es6-babel-react-flux-karma/test/components/Greeting.tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import * as TestUtils from 'react-addons-test-utils';
33
import Greeting from '../../src/components/Greeting';
44
import * as GreetingActions from '../../src/actions/GreetingActions';
5-
const __react = React; // only in place to prevent React being purged from dependencies as not used directly
5+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
66

77
describe('Greeting', () => {
88
let handleSelectionChangeSpy: jasmine.Spy;

es6-babel-react-flux-karma/test/components/WhoToGreet.tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import * as TestUtils from 'react-addons-test-utils';
33
import WhoToGreet from '../../src/components/WhoToGreet';
44
import * as GreetingActions from '../../src/actions/GreetingActions';
5-
const __react = React; // only in place to prevent React being purged from dependencies as not used directly
5+
React; // use React as an expression to prevent React being purged from dependencies as not used directly
66

77
describe('WhoToGreet', () => {
88
let handleSelectionChangeSpy: jasmine.Spy;

0 commit comments

Comments
 (0)