React-helmet: As high-order component

Created on 4 Nov 2015  路  8Comments  路  Source: nfl/react-helmet

Hey there, this project is awesome.

Anyway, I think it would be nice to have / use react-helmet as HOC.

@helmet(props => ({ title: `${props.user.name}'s profile` }))
class HomeView extends Component {

Why?
I don't really want to pollute my render, and I think it would be easier where the page title lies.

enhancement help wanted

Most helpful comment

Agreed! HOC.

All 8 comments

As a decorator, yes, that's an interesting idea. PRs are welcome!

No problem, but can we keep this issue open til the PR is merged (so I don't forget; or if anybody else wants to take on the issue)?

Yes, I will mark this as a feature request and leave it open.

@srph Do you need only document title? Have you taken a look at https://github.com/gaearon/react-document-title?

If that doesn't suit your needs, I'm interested to work on this.

Any news on this? helmet as decorator would be awesome

Agreed! HOC.

+1

Closing - This issues is over a year old. If needed please feel free to file a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshwcomeau picture joshwcomeau  路  3Comments

bassarisse picture bassarisse  路  3Comments

olalonde picture olalonde  路  3Comments

tinynumbers picture tinynumbers  路  5Comments

MiguelMachado-dev picture MiguelMachado-dev  路  4Comments