Skip to content

Commit eb2440f

Browse files
Updated React default imports to namespace imports
1 parent aa90a4a commit eb2440f

23 files changed

+26
-23
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.0.2 (December XX, 2024)
2+
- Updated the import of the React library from default imports to namespace imports for better compatibility with React, TypeScript, ES modules, and tree shaking.
3+
14
2.0.1 (December 4, 2024)
25
- Updated @splitsoftware/splitio package to version 11.0.3 that includes some improvements and bugfixes.
36
- Updated internal handling of the `updateOnSdkTimedout` param to remove the wrong log "[ERROR] A listener was added for SDK_READY_TIMED_OUT on the SDK, which has already fired and won't be emitted again".

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio-react",
3-
"version": "2.0.1",
3+
"version": "2.0.2-rc.0",
44
"description": "A React library to easily integrate and use Split JS SDK",
55
"main": "cjs/index.js",
66
"module": "esm/index.js",

src/SplitClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22
import { SplitContext } from './SplitContext';
33
import { ISplitClientProps } from './types';
44
import { useSplitClient } from './useSplitClient';

src/SplitContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22
import { ISplitContextValues } from './types';
33
import { EXCEPTION_NO_SFP } from './constants';
44

src/SplitFactoryProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22

33
import { ISplitFactoryProviderProps } from './types';
44
import { VERSION, WARN_SF_CONFIG_AND_FACTORY } from './constants';

src/SplitTreatments.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22

33
import { SplitContext } from './SplitContext';
44
import { ISplitTreatmentsProps } from './types';

src/__tests__/SplitClient.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22
import { render, act } from '@testing-library/react';
33

44
/** Mocks and test utils */

src/__tests__/SplitContext.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22
import { render } from '@testing-library/react';
33
import { SplitContext } from '../SplitContext';
44
import { SplitFactoryProvider } from '../SplitFactoryProvider';

src/__tests__/SplitFactoryProvider.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import * as React from 'react';
22
import { render, act } from '@testing-library/react';
33

44
/** Mocks */

0 commit comments

Comments
 (0)