-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.20 preview #2508
base: master
Are you sure you want to change the base?
0.20 preview #2508
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit cca0fb1:
|
Size change: +0.78 kB
View unchanged
|
Extend ImageLoader functionality to be able to work with image sources containing headers We preserve the existing strategy that works with image.src for cases where source is just an uri with no headers When sources contain headers we make a fetch request and then render a local url for the downloaded blob (URL.createObjectURL) Fix #1019 Fix #2268 Close #2442
If the Image component is rendered with a `null` source, and consecutively updated with actual source url that was already loaded, it would fail to pick up the change - `state` would be `IDLE` for a brief moment and this would cause a small flicker when the image renders Let's always start from IDLE state, and update `shouldDisplaySource` condition to be based on `ImageLoader.has` cache or not Fix #2492
I would like to use the preview in my application as I would love to take advantage of the Image http headers. I'll admit im not well versed in git... how would I reference this instead of 0.19? 0.20-dev doesnt appear to change anything |
0.20 will be focused on the "Image" milestone: https://github.com/necolas/react-native-web/milestone/18
Notes
StyleSheet runtime for compilers
babel-plugin-react-native-web
has a new optionlegacy
, which istrue
by default. Set it tofalse
and the plugin will no longer rewrite any'react-native'
paths, with the exception of theStyleSheet
import.The
StyleSheet
import is rewritten to[..]/StyleSheet/runtime
.The runtime is only
StyleSheet()
withoutcreate
,compose
,flatten
, etc., support.The
legacy:false
option should be used only if a built-time compiler is being used to extract styles to CSS, and either inline results or error the otherStyleSheet
method calls React Native includes. The compiler output should follow the style object format described by the styleq runtime.This is an experiment to add a mechanism to exclude the runtime style compiler from builds. It's open to feedback and iteration.
Changelog
New features