question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't create new components that take advantage of react-intl

See original GitHub issue

Hi! First off, impressive work, especially for my current usecase, I already write a react app with react-intl but my webpack build didn’t work well enough and this projects fits perfectly.

I wanted to attach a Header and Footer component and I’m getting the following error: <IntlProvider> needs to exist in the component ancestry

Normally i would see the provider but I coudn’t find it anywhere on the src I’m adding the Header component to the index inside the router, as it should accept components out side the switch, everything seems fine until I try to use the intl injectIntl(Header) and add the references required

Is there a configuration I’m missing?

Thanks in advantage

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Enough7commented, May 19, 2021

@TarikHuber I added a <Redirect.../> to /home in the landing page and set every route in routes.js to an unauthorizedRoute

0reactions
TarikHubercommented, Apr 21, 2021

Can you explain more your use case?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-intl for non components - Stack Overflow
I have created a separate component as 'CurrentLocale' and inject-intl to it. The exporting function t will use intl formatMessage from ...
Read more >
Components | Format.JS
React Intl has a set of React components that provide a declarative way to setup an i18n context and format dates, numbers, and...
Read more >
React Intl: Internationalize your React apps - LogRocket Blog
With the React Intl library, learn how to internationalize any React project to seamlessly change language and currency within web apps.
Read more >
[RFC] React Intl Component Details #65 - GitHub
A core principal behind FormatJS is providing a declarative way to format data and strings by providing high-level integrations with ...
Read more >
Internationalize your React App with React Intl - bene : studio
To start using react-intl, first similarly to redux, you need a provider ... To use messages in a component we advise having a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found