@@ -5,11 +5,11 @@ import { Nullable } from '@babylonjs/core/types.js'
5
5
import { ValueAndUnit } from '@babylonjs/gui/2D/valueAndUnit.js'
6
6
7
7
import ReactReconciler , { Fiber , HostConfig } from 'react-reconciler'
8
- import {
9
- DiscreteEventPriority ,
10
- ContinuousEventPriority ,
11
- DefaultEventPriority ,
12
- } from 'react-reconciler/constants.js'
8
+ // import {
9
+ // DiscreteEventPriority,
10
+ // ContinuousEventPriority,
11
+ // DefaultEventPriority,
12
+ // } from 'react-reconciler/constants.js'
13
13
14
14
import { CreationType , GeneratedParameter } from './codeGenerationDescriptors'
15
15
import { CreatedInstance , CreatedInstanceMetadata } from './CreatedInstance'
@@ -47,10 +47,10 @@ type HostContext = Container
47
47
type TimeoutHandle = number | undefined
48
48
type NoTimeout = number
49
49
50
- // TODO: get from react-reconciler directly via import - /constants in typings, but not in NPM.
51
- // const DiscreteEventPriority = 0b0000000000000000000000000000001;
52
- // const ContinuousEventPriority = 0b0000000000000000000000000000100;
53
- // const DefaultEventPriority = 0b0000000000000000000000000010000;
50
+ // NOTE: importing from react-reconciler directly was causing some issues with next.js (https://github.com/brianzinn/react-babylonjs/issues/358)
51
+ const DiscreteEventPriority = 0b0000000000000000000000000000001
52
+ const ContinuousEventPriority = 0b0000000000000000000000000000100
53
+ const DefaultEventPriority = 0b0000000000000000000000000010000
54
54
55
55
// https://github.com/facebook/react/tree/main/packages/react-reconciler#getcurrenteventpriority
56
56
// https://github.com/facebook/react/blob/main/packages/react-dom/src/events/ReactDOMEventListener.js#L410
0 commit comments