Skip to content

Conversation

StyleT
Copy link
Contributor

@StyleT StyleT commented Sep 21, 2020

No description provided.

const _ = require('lodash');
const cookie = require('cookie');

const DEFAULT_LOCALE = 'en-US';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, it would be nice to have this and the code below in the config
What do you think about it?

const filterHeaders = require('./filter-headers');
const errorHandlingService = require('../errorHandler/factory');
const errorHandlerSetup = require('./error-handler');
const fragmentHooks = require('./fragment-hooks');
const ConfigsInjector = require('./configs-injector');
const processFragmentResponse = require('./process-fragment-response');

module.exports = function (cdnUrl, nrCustomClientJsWrapper = null) {
module.exports = function (cdnUrl, nrCustomClientJsWrapper = null, registryService) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess registryService should be the first param because nrCustomClientJsWrapper is null by default

Copy link
Contributor

@nightnei nightnei Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moreover, imho it's better to use object(e.g {cdnUrl, nrCustomClientJsWrapper = null, registryService}) here, since we have too many params and some of them are optional

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed args order. We can use obj syntax later IMO

@StyleT StyleT requested a review from oleh-momot September 23, 2020 12:14
@StyleT StyleT merged commit b31216c into feature/i18n/master Sep 23, 2020
@StyleT StyleT deleted the feature/i18n/basic_ssr_implementation branch September 23, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants