Skip to content

Why not do away with .ejs templates altogether #25

Description

@ORESoftware

I used to think that having templates (like .ejs) was needed or useful with React.
But now I believe you can just do away with it entirely, and use React's compose-ability.

So why no create a parent component that looks something like so:

const React = require('react');

module.exports = React.createClass({

   render: function(){

      return (

          <html lang="en">
          <head>
              <meta charset="UTF-8">
                  <title>Title</title>
          </head>
          <body>

              {this.props.body}

          </body>
          </html>

      )
   } 
});

perhaps React does not allow <html> <body> <head> tags?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions