Skip to content

Instantly share code, notes, and snippets.

@jaksm
Created June 24, 2019 14:32
Show Gist options
  • Save jaksm/3189f7dcf557d71504669bdc0a434c84 to your computer and use it in GitHub Desktop.
Save jaksm/3189f7dcf557d71504669bdc0a434c84 to your computer and use it in GitHub Desktop.
Hob Intl
...imports
import IntlContext from "......./intl.context"
// Za class-based komponente
class BenefitCockpit extends Component {
static contextType = IntlContext;
render() {
return (
<h1>{this.context.member.suggest.title}</h1>
)
}
}
import React, { useContext } from "react";
import IntlContext from "......./intl.context"
const Breadcrumb = props => {
const context = useContext(IntlContext)
return (...some jsx)
}
{
"member": {
"suggest": {
"title": "Write your...",
"labels": {
"info": "asdasd"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment