Comments (3)
The portal gets the context because it is rendered in the same React as the other objects. But here, as you said earlier, we have problems because we are in another React root.
You could wrap your component in a new ContextProvider.
<BarLeft>
<ContextProvider t={this.props.t}>
<MyBreakingComponent>
</ContextProvider>
</BarLeft>
from cozy-bar.
One thing we could try is using portals, maybe? Something lik this might work:
const MyBreakingComponent = translate()(({ t }) => <div>{t('my_app_string')}</div>)
<Main>
<BarLeft><div id="landing-zone" /></BarLeft>
<Portal into="#landing-zone">
<MyBreakingComponent />
</Portal>
</Main>
from cozy-bar.
Duplicate of #144 , moving things over there.
from cozy-bar.
Related Issues (20)
- CozyBar & reactIs.isMemo ? HOT 1
- updateAccessToken should not be used with a cozy-client instance initialization HOT 2
- Why harvest is a `dep`? HOT 1
- [mobile] [websocket]Β this._websocked.send : null is not an object
- upgrade enzyme & enzyme adapter
- BarRight / Left / Center and Context Provider HOT 3
- Dependency Dashboard
- Why is there body,html{height:auto} in the CSS of the bar ?
- coz-bar-container should align-items center
- feat: Support lack of sprite
- We should not rely on hard coded colors
- The height of the cozy-bar should be 56px for desktop and tablet
- Remove default value from DOM
- There should be a stable dev branch for v7 HOT 1
- Fix style of "coz-bar-container"
- Is Piwik still relevant?
- Is Piwik still relevant?
- The automated release is failing π¨
- The automated release is failing π¨
- BarRight / BarCenter / BarLeft should use extra content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cozy-bar.