Skip to content

Commit 9c5cfd5

Browse files
committed
upd
1 parent 68f551d commit 9c5cfd5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

MIGRATION.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In v6, the SDK architecture has been modularized to give you more control over d
2323
- The monolithic `createInstance` call is now split into multiple factory functions
2424
- Core functionality (project configuration, event processing, ODP, VUID, logging, and error handling) is now configured through dedicated components created via factory functions, giving you greater flexibility and control in enabling/disabling certain components and allowing optimizing the bundle size for frontend projects.
2525
- Event dispatcher interface has been updated to use Promises
26-
- onReady Promise Behavior has changed
26+
- onReady Promise behavior has changed
2727

2828
## Client Initialization
2929

@@ -113,7 +113,7 @@ const optimizely = createInstance({
113113

114114
## Project Configuration Management
115115

116-
In v6, datafile management is handled by a dedicated Project Config Manager. Choose either:
116+
In v6, datafile management must be configured by passing in a `projectConfigManager`. Choose either:
117117

118118
### Polling Project Config Manager
119119

@@ -153,7 +153,6 @@ Queues events and sends them in batches:
153153
const batchEventProcessor = createBatchEventProcessor({
154154
batchSize: 10, // optional, default is 10
155155
flushInterval: 1000, // optional, default 1000 for browser
156-
eventDispatcher: customEventDispatcher, // optional
157156
});
158157
```
159158

@@ -162,13 +161,11 @@ const batchEventProcessor = createBatchEventProcessor({
162161
Sends events immediately:
163162

164163
```javascript
165-
const forwardingEventProcessor = createForwardingEventProcessor({
166-
eventDispatcher: customEventDispatcher, // optional
167-
});
164+
const forwardingEventProcessor = createForwardingEventProcessor();
168165
```
169166

170167
### Custom event dispatcher
171-
The `EventDispatcher` interface has been updated so that the `dispatchEvent` method returns a Promise instead of calling a callback.
168+
In both v5 and v6, custom event dispatchers must implement the `EventDispatcher` interface. In v5, the `EventDispatcher` interface has been updated so that the `dispatchEvent` method returns a Promise instead of calling a callback.
172169

173170
In v5 (Before):
174171

0 commit comments

Comments
 (0)