react native application not bundling - react-native

I'm trying to run my application from Xcode version 10.3 and react native version 0.57.8
open a terminal Running Metro Bundler on port 8081. and it's done but the simulation did not bundle project brings an older version.
I tried to delete node_modules again install and same way for pod file but it's still not working also I tried clear bundle but still not bundle my project?
any idea?

Try adding overflow: 'hidden' as below
const SCREEN_WIDTH = Dimensions.get("window").width;
const SCREEN_HEIGHT = Dimensions.get("window").height;
<View style={{ height: SCREEN_HEIGHT , width: SCREEN_WIDTH ,overflow:'hidden' }}>
<WebView
source={{ uri: 'https://github.com/facebook/react-native' }}
scalesPageToFit={true}
/>
</View>

Related

How to rotate image in react native

I was using react-native-image-rotate to rotate images but its no longer mantained, any idea what could be a good alternative.
ps: I am not using expo and I am using react-native v0.71.0
I tried react-native-photo-manipulator and other packages but the build fails everytime.
Use transform style properties.
<Image
style={{width: 50, height: 50, transform: [{rotate: '45deg'}]}}
source={{
uri: 'https://reactnative.dev/img/tiny_logo.png',
}}
/>

react native expo fast image is not working

I saw this article:
https://expo.canny.io/feature-requests/p/react-native-fast-image
I install expo react native fast image. So I want to use it but I get this err message:
Invariant Violation: requireNativeComponent: "FastImageView" was not found in the UIManager.
Code:
...
import FastImage from 'react-native-fast-image';
...
{ /* Modal Shipping */ }
<Modal
isVisible={modalView}
swipeDirection="down"
swipeThreshold={20}
propagateSwipe={true}
backdropTransitionOutTiming={0}
>
<View style={{ justifyContent: 'center', padding: 12, alignItems: 'center', backgroundColor: '#fff', borderRadius: 12, padding: 12, borderWidth: 4, borderColor: '#ac67f9'}}>
<FastImage source={{uri: 'https://i.ebayimg.com/thumbs/images/g/QSIAAOSw3gNggE1r/s-l225.webp'}} resizeMode="contain" />
</View>
</Modal>
Is there any new option for this? In expo project, "FastImageView was not found in the UIManager." still occurs.
I've managed to install react-native-fast-image to my expo project. Here is what I've done:
Make sure you run the eas build -p all --profile development Ensure
eas-cli is installed prior to run this script.
After running it, you will have an eas.json file in the root dir of
the project.
The next step is to run expo run:ios or expo run:android, then
you will notice the generated native folders (android, ios) in the
root dir again...
All should work just fine after these steps.
Use this package it is super fast
expo fast image

react-native-webview don't supported Window?

I use EXPO SDK 38 and react-native-webview:10.9.0,I run the code
<View style={styles.mapView} >
<WebView
source={{ uri: 'https://www.google.com' }}
onLoad={console.log('success')}
onLoadStart={console.log('start')}
style={{width:'100%',height:'100%'}}
/>
</View>
Android and IOS is OK, but Web is not OK. I check the react-native-webview website,it supported Windows.

React native blurRadius prop for Image is not working on local files on expo

The blurRadius property for react native Image component is not working for local files, only remote URIs.
Is this a version problem? I'm using expo sdk 33.
<Image
style={{ width: '100%', height: '100%' }}
source={require('../../../assets/images/home.png')}
blurRadius={1}
resizeMode="contain"
/>
Found a similar question about that but it's not a syntax problem.
It looks like this is a bug in react-native. Try using import instead of requireAsset
import image from '../../../assets/images/home.png'
then render your component using the import
<Image
style={{ width: '100%', height: '100%' }}
source={image}
blurRadius={1}
resizeMode="contain"
/>
Please increase the blurRadius value (1 to 10)
blurRadius={10} <== Magic Code
Here This DocsThis

How to modify expo android styles.xml in react native app

As many others before me, I'm looking for the way to customize expo android's theme colors and styles in order to customize native components styles like DatePicker.
I found a lot of posts explaining the same old thing: "Update your style the native android way!"
Ok then, but my React native project doesn't have any "res/values/styles.xml" and so on. Creating them from scratch has no effect.
There's one step that I'm deadly missing here, but which one?
My repo looks a bit like this actually:
.expo
/* a bunch of folders containing my custom js */
App.js
app.json
babel.config.js
package.json
package-lock.json
You can use Style Sheet.
Create a new StyleSheet:
const styles = StyleSheet.create({
container: {
borderRadius: 4,
borderWidth: 0.5,
borderColor: '#d6d7da',
},
title: {
fontSize: 19,
fontWeight: 'bold',
},
activeTitle: {
color: 'red',
},
});
Use a StyleSheet:
<View style={styles.container}>
<Text style={[styles.title, this.props.isActive && styles.activeTitle]} />
</View>
this is detail link
To configure a style, such as Android.xml, you can separate it by doing expo eject.
When you do expo eject, you get Android folder.
about `expo eject' link