paypal / react-engine

a composite render engine for universal (isomorphic) express apps to render both plain react views and react-router views
Apache License 2.0
1.45k stars 130 forks source link

Added createOption staticMarkup. #182

Closed pazguille closed 7 years ago

pazguille commented 7 years ago

Adding a create option to indicate if render components without React data attributes and client data. (Default: false). This is useful if you want to render simple static page, as stripping away the extra React attributes and client data can save lots of bytes.

Usage

const engine = reactEngine.server.create({
  doctype: '<!DOCTYPE html>',
  staticMarkup: true
});
samsel commented 7 years ago

👍