-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/i18n/refactoring and tests #230
Conversation
…ntation Feature/i18n/basic ssr implementation
const i18n = registryConf.settings.i18n.enabled | ||
? new I18n(registryConf.settings.i18n, singleSpa, appErrorHandlerFactory) | ||
: null; | ||
const router = new Router(registryConf, state, i18n ? i18n.unlocalizeUrl : undefined, singleSpa); |
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.
it's not critical, but will be better to put undefined
arguments as last argument or as optional inside object. and in this case we won't set undefiend
here.
https://github.com/namecheap/ilc/pull/230/files#diff-318e72ee3c278cb96c1bb2130002e8a9bcdebd2042222be2a5284e589a1bb75eR204
const preparationPromises = handlers.map(v => v.prepare(eventDetail)); | ||
|
||
return Promise.allSettled(preparationPromises).then(results => { | ||
for (let ii = 0; ii < results.length; ii++) { |
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.
why ii
? 😁
return Promise.allSettled(executionPromises); | ||
}).then(results => { | ||
results | ||
.map((v, i) => { |
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.
it's better to use reduce
here
@@ -0,0 +1,88 @@ | |||
const _ = require('lodash'); |
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 propose to not use lodash if we can do it.
for example, here we can use deepmerge
package.
No description provided.