Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Indentation samples
/*
** Indented using the TM command 'Indent Selection' (opt + cmd + [)
*/
import BodyClassName from 'react-body-classname';
import DocumentTitle from 'react-document-title';
import generateDocumentTitle from 'components/lib/pageDisplay';
import React from 'react';
function MyComponent() {
const componentClass = 'my-component';
const docTitleSnippet = 'My Component';
const docTitle = generateDocumentTitle(docTitleSnippet);
return (
<div className={componentClass}>
<BodyClassName className={componentClass}>
<DocumentTitle title={docTitle}>
<h1>{docTitleSnippet}</h1>
</DocumentTitle>
</BodyClassName>
</div>
);
}
export default MyComponent;
import BodyClassName from 'react-body-classname';
import DocumentTitle from 'react-document-title';
import generateDocumentTitle from 'components/lib/pageDisplay';
import React from 'react';
function MyComponent() {
const componentClass = 'my-component';
const docTitleSnippet = 'My Component';
const docTitle = generateDocumentTitle(docTitleSnippet);
return (
<div className={componentClass}>
<BodyClassName className={componentClass}>
<DocumentTitle title={docTitle}>
<h1>{docTitleSnippet}</h1>
</DocumentTitle>
</BodyClassName>
</div>
);
}
export default MyComponent;
import BodyClassName from 'react-body-classname';
import DocumentTitle from 'react-document-title';
import generateDocumentTitle from 'components/lib/pageDisplay';
import React from 'react';
function MyComponent() {
const componentClass = 'my-component';
const docTitleSnippet = 'My Component';
const docTitle = generateDocumentTitle(docTitleSnippet);
return (
<div className={componentClass}>
<BodyClassName className={componentClass}>
<DocumentTitle title={docTitle}>
<h1>{docTitleSnippet}</h1>
</DocumentTitle>
</BodyClassName>
</div>
);
}
export default MyComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.