Comments (11)
@taylorlapeyre could you try with @4.2.1-beta.0 ? It should be fixed now. It attempts to render out the middlewares result instead of relying on a promise, thereby the fragment ends up in the same render-tree, which hopefully doesn't break context.
from react-spring.
@drcmda Yes, I'll give it a shot!
from react-spring.
@drcmda it's working beautifully now!
from react-spring.
@drcmda Will test with router and styled-components w/ ThemeProvider, will update
from react-spring.
Totally works now!
from react-spring.
Update: tried this a little more and it seems that when the portal is created, the style of the page is (very briefly) removed. When you have custom fonts you can observe fonts changing back to serif font.
EDIT: only happens on first invocation (video, happens at the 3 second mark in Chrome)
from react-spring.
Probably due to css inheritance. The dom node that the fragment is projected into is at the root.
from react-spring.
font-family is set on :root
. Also, the Spring and animated.div
should not (?) affect the rest of the page, right? There's 2 frames in that video where the whole page's font-family resets for some reason.
from react-spring.
Spring and animated.div are just regular components, must be something else. The portal renders off-screen in a div set to position:static;visibility:hidden;
, but it isn't shown, we pick bounds and then the element renders like always, with auto
being overwritten by the new bounds. I couldn't imagine any of it would have an impact on the font-family. Here's some info on how fout can come about: https://www.paulirish.com/2009/fighting-the-font-face-fout/
from react-spring.
closing this for now, should something else come up i can reopen
from react-spring.
@drcmda yep, issue was unrelated after all, spring works great now after ditching styled-components' injectGlobal
for font injection
from react-spring.
Related Issues (20)
- [bug]: Promise returned by Controller.start is not resolved consistently
- [bug]: When included in a module, react-spring resolves to the string "/static/media/react-spring_web.development.34d7028f586cc8ee5e8e.cjs" HOT 2
- why require('react-spring') returns string instead of object HOT 1
- [bug]: @react-spring/konva + typescript HOT 3
- [bug]: Noise demo page - CodeSandbox still using 9.5.5 version
- [feat]: Integration of Tailwind CSS with React Spring for Declarative and Styled Animations
- [bug]: Wrong source-maps
- [bug]: ./node_modules/@react-spring/shared/dist/react-spring_shared.legacy-esm.js 1023:7 HOT 3
- [bug]: update transform
- [bug]: react-spring Identifier 'React' has already been declared HOT 3
- [bug]: Incorrect tooltips in useTransition docs HOT 1
- [bug]: React-Spring.dev main website down HOT 1
- [bug]: useResize is jumpy
- [bug]: The leave option in config object behaves inconsistently when using useTransition HOT 1
- [bug]: Website with docs not working in chrome (120.0.6099.72) HOT 3
- [bug]: Documentation website is broken after the first visit on most desktop browser HOT 8
- [bug]: libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument HOT 1
- [bug]: It’s the same problem. There is no CSS style when visiting the website. HOT 1
- [bug]: Animation did not run when using useSpring in next 14 Dev Mode. HOT 1
- [bug]: styles are not updated when using useSprings in conjunction with deleting items from a list HOT 1
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 react-spring.