{"action":"created","issue":{"url":"https://api.github.com/repos/yahoo/react-intl/issues/1190","repository_url":"https://api.github.com/repos/yahoo/react-intl","labels_url":"https://api.github.com/repos/yahoo/react-intl/issues/1190/labels{/name}","comments_url":"https://api.github.com/repos/yahoo/react-intl/issues/1190/comments","events_url":"https://api.github.com/repos/yahoo/react-intl/issues/1190/events","html_url":"https://github.com/yahoo/react-intl/issues/1190","id":365425819,"node_id":"MDU6SXNzdWUzNjU0MjU4MTk=","number":1190,"title":"(Question) Change title page","user":{"login":"CMonjo","id":31744890,"node_id":"MDQ6VXNlcjMxNzQ0ODkw","avatar_url":"https://avatars0.githubusercontent.com/u/31744890?v=4","gravatar_id":"","url":"https://api.github.com/users/CMonjo","html_url":"https://github.com/CMonjo","followers_url":"https://api.github.com/users/CMonjo/followers","following_url":"https://api.github.com/users/CMonjo/following{/other_user}","gists_url":"https://api.github.com/users/CMonjo/gists{/gist_id}","starred_url":"https://api.github.com/users/CMonjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMonjo/subscriptions","organizations_url":"https://api.github.com/users/CMonjo/orgs","repos_url":"https://api.github.com/users/CMonjo/repos","events_url":"https://api.github.com/users/CMonjo/events{/privacy}","received_events_url":"https://api.github.com/users/CMonjo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-01T11:51:44Z","updated_at":"2018-10-04T18:53:35Z","closed_at":null,"author_association":"NONE","body":"Hey ! \r\nI'm sorry to post an issue for that but I can not find an answer to my question.\r\nI am trying to use my website.\r\n\r\njson files :\r\n```\r\nfr.json:\r\n{\r\n     \"errorPage.title\": Error 404 \"\r\n}\r\nen.json:\r\n{\r\n     \"errorPage.title\": Error 404 \"\r\n}\r\n```\r\n\r\nI have this in my file:\r\n```\r\nconst title = <FormattedMessage id = \"errorPage.title\" defaultMessage = \"Error 404\" />\r\n\r\ndocument.title = title;\r\n```\r\nThat return to my title page this [object Object]\r\nHow can I do? I start in React and I do not use Redux, should it? Thank's!"},"comment":{"url":"https://api.github.com/repos/yahoo/react-intl/issues/comments/427130733","html_url":"https://github.com/yahoo/react-intl/issues/1190#issuecomment-427130733","issue_url":"https://api.github.com/repos/yahoo/react-intl/issues/1190","id":427130733,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzEzMDczMw==","user":{"login":"CMonjo","id":31744890,"node_id":"MDQ6VXNlcjMxNzQ0ODkw","avatar_url":"https://avatars0.githubusercontent.com/u/31744890?v=4","gravatar_id":"","url":"https://api.github.com/users/CMonjo","html_url":"https://github.com/CMonjo","followers_url":"https://api.github.com/users/CMonjo/followers","following_url":"https://api.github.com/users/CMonjo/following{/other_user}","gists_url":"https://api.github.com/users/CMonjo/gists{/gist_id}","starred_url":"https://api.github.com/users/CMonjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMonjo/subscriptions","organizations_url":"https://api.github.com/users/CMonjo/orgs","repos_url":"https://api.github.com/users/CMonjo/repos","events_url":"https://api.github.com/users/CMonjo/events{/privacy}","received_events_url":"https://api.github.com/users/CMonjo/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T18:53:35Z","updated_at":"2018-10-04T18:53:35Z","author_association":"NONE","body":"Hey ! Thank you for your answers !\r\nI'm sorry, I started on React and despite research I can not understand what you offer me as alternatives.\r\nI show you my component which is a 404 page.\r\n```\r\nimport React, { Component } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport {FormattedMessage, injectIntl} from 'react-intl';\r\nimport './ErrorPage.css';\r\nimport Header from '../Headers/NormalHeader';\r\n\r\nconst DocumentTitle = () => (\r\n\t<FormattedMessage id='error.pageTitle' defaultMessage='Error 404'>\r\n\t{(message) => {\r\n\t\tif (document.title !== message) {\r\n\t\t\tdocument.title = message\r\n\t\t}\r\n\t\treturn null\r\n\t}}\r\n\t</FormattedMessage>\r\n)\r\n\r\nclass ErrorPage extends Component {\r\n\trender() {\r\n\t\tdocument.title = \"viaTransit. - Erreur\";\r\n\t\tlet code = this.props.code;\r\n\r\n\t\tif (typeof code === 'undefined')\r\n\t\t\tcode = \"404\";\r\n\t\t\r\n\t\treturn (\r\n\t\t\t<main>\r\n\t\t\t\t<Header name={code}/>\r\n\t\t\t\t<section className=\"error-section\">\r\n\t\t\t\t\t<h1>\r\n\t\t\t\t\t\t<FormattedMessage id=\"errorPage.sad\"\r\n\t\t\t\t\t\tdefaultMessage=\"oopsie :(\"/>\r\n\t\t\t\t\t</h1>\r\n\t\t\t\t\t<h2>\r\n\t\t\t\t\t\t<FormattedMessage id=\"errorPage.message\"\r\n\t\t\t\t\t\tdefaultMessage=\"Cette page n'existe pas !\"/>\r\n\t\t\t\t\t</h2>\r\n\t\t\t\t\t<Link to=\"/\" className=\"error-section-goback\">\r\n\t\t\t\t\t\t<i className=\"material-icons\">keyboard_arrow_left</i>\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t<FormattedMessage id=\"errorPage.btnBack\"\r\n\t\t\t\t\t\t\tdefaultMessage=\"Retour\"/>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</Link>\r\n\t\t\t\t</section>\r\n\t\t\t</main>\r\n\t\t)\r\n\t}\r\n}\r\n\r\nexport default ErrorPage;\r\n```\r\nI have tried both of the solutions you have proposed to me, @DragonRaider5 and @oriSomething, but I do not know where to put the code or how to use it.\r\nThank you for your answers !\r\n"}}
{"actor":{"display_login":"CMonjo"}}