question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expo Web is stretching the buttons on browser

See original GitHub issue

I have gone through these following points

Issue Description

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.

Issue Image

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.

node, npm, react-native, react and native-base version, expo version if used, xcode version

Expected behaviour

Button should be of right size and not stretched from left to right.

Actual behaviour

Button comes as stretched.

Steps to reproduce

  • expo init sample-project && cd sample-project
  • yarn add native-base --save
  • expo install expo-font
  • Use below App.js
import 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>
    );
  }
}

Is the bug present in both iOS and Android or in any one of them?

Have not tried.

Any other additional info which would help us debug the issue quicker.

NA

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
ediopiacommented, Aug 30, 2019

Same problem here. Button styles working weird with Expo.

1reaction
samkitcommented, Aug 22, 2019

Closed by mistake.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebBrowser - Expo Documentation
expo -web-browser provides access to the system's web browser and supports handling redirects. On iOS, it uses SFSafariViewController or SFAuthenticationSession ...
Read more >
View - Expo Web - GitBook
The backgroundSize CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or...
Read more >
[expo-web-browser] Browser closes when switching to a ...
Start your login flow using AuthSession.startAsync and then continue it when it resolves successfully. If it's not successful then give the user ...
Read more >
Expo React-Native Web Browser Back Button - Stack Overflow
I'm looking at using React-Native and Expo to build a web app. The only real issue I'm running into is allowing the use...
Read more >
Easier React Native Development With Expo - Code
Snack is like a browser-based IDE tailored for React Native app development. You can write code and see the result right in your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found