Skip to content
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

OC plugin to render nested components on the server-side #224

Closed
matteofigus opened this issue Apr 5, 2016 · 2 comments
Closed

OC plugin to render nested components on the server-side #224

matteofigus opened this issue Apr 5, 2016 · 2 comments
Assignees

Comments

@matteofigus
Copy link
Member

When rendering nested components on the server-side, an unnecessary network trip is required to make extra requests to the registry itself.
The ideal solution for optimally approaching to this scenario would be to have a plugin to render nested components using exposed registry internals to do the rendering via the same instance.

The api for a server.js file should be something like this:

module.exports.data = function(context, callback){
  var nestedComponents = [
    { name: 'component', parameters: { 'hello': 'world' }},
    { name: 'component2', parameters: { 'hello': 'world' }}
  ];
  context.plugins.renderComponents(nestedComponents, function(err, components){
    callback(null, components);
  });
};

The plugin should have the same API as the node.js client's renderComponents method - but it should do the rendering without making an extra request to itself.

@navamgupta
Copy link

Guys,

Whats the plan/priority for this feature? Teams at Chegg are really looking forward to it since half of us are on PHP making it interesting to do rendering part server side.

Thanks,
Navam

@matteofigus
Copy link
Member Author

Hi @navamgupta I think we haven't started yet with this. Will try to prioritise it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants