I am using expo sdk v34 and trying to work out an example on web. I created new project using expo init and then did yarn add native-base along with expo install expo-font. On start expo web, the web page comes up but the button that I added is stretched from left to right completely.

Where as if I clone the repo that was given by Evan Bacon (and use my simplified App.js) then it works fine. But the catch there is if I remove yarn.lock file from the repo then it also shows the same behavior.
Button should be of right size and not stretched from left to right.
Button comes as stretched.
expo init sample-project && cd sample-projectyarn add native-base --saveexpo install expo-fontApp.jsimport React from 'react';
import { AppLoading } from 'expo';
import * as Font from 'expo-font';
import { Ionicons } from '@expo/vector-icons';
import { Container, Header, Content, Button, Text } from 'native-base';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
isReady: false,
};
}
async componentDidMount() {
await Font.loadAsync({
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
...Ionicons.font,
});
this.setState({ isReady: true });
}
render() {
return (
<Container>
<Header />
<Content>
<Button rounded>
<Text>Click Me!</Text>
</Button>
</Content>
</Container>
);
}
}
Have not tried.
NA
Closed by mistake.
It can be fixed by alignSelf for Button component or by alignItems for the parent of the Button component
Same problem here. Button styles working weird with Expo.
I have same problem in React Native. Is there anybody to can solve this?
Most helpful comment
Same problem here. Button styles working weird with Expo.