Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cfa14e2

Browse files
committedAug 15, 2017
Manage <head> title with react-helmet
1 parent 81bcf03 commit cfa14e2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎common/js/containers/Home/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import React, { Component } from 'react';
2+
import { Helmet } from 'react-helmet';
23
import css from './index.scss';
34

45
export default class HomeContainer extends Component {
56
render() {
67
return (
78
<div className={css.home}>
9+
<Helmet>
10+
<title>Home</title>
11+
</Helmet>
812
<h1>It Works!</h1>
913
</div>
1014
);

‎common/js/containers/Todos/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import { connect } from 'react-redux';
4+
import { Helmet } from 'react-helmet';
45
import { addTodo, toggleTodo, removeTodo, fetchTodos } from 'actions/todos';
56
import { Container, Header, Checkbox, List, Button, Form } from 'semantic-ui-react';
67
import classnames from 'classnames';
@@ -56,7 +57,10 @@ class TodosContainer extends Component {
5657

5758
return (
5859
<Container>
59-
<Header>To-Dos</Header>
60+
<Helmet>
61+
<title>To-Do List</title>
62+
</Helmet>
63+
<Header>To-Do List</Header>
6064
<List divided className={css.todos}>
6165
{todos.map((todo, idx) => {
6266
const { id, text, completed } = todo;

0 commit comments

Comments
 (0)
Please sign in to comment.