Giter Club home page Giter Club logo

Comments (10)

alvaromb avatar alvaromb commented on June 3, 2024

Thanks for the bug report @skyride99! Will take a look :)

from react-native-button.

alvaromb avatar alvaromb commented on June 3, 2024

Oh! by 0.18.1 you mean https://github.com/facebook/react-native/releases/tag/v0.19.0-rc ?

from react-native-button.

skyride99 avatar skyride99 commented on June 3, 2024

Its in package.json as 18.1 I did not update it. Just a regular react-native init.

I tried on RN 17 also same problem.

from react-native-button.

skyride99 avatar skyride99 commented on June 3, 2024

This works in iOS but not Android.

button tag swallowed by github
<Button
style={styles.greenButton} textStyle={styles.textStyle}
onPress={() => {
console.log('sign in!')
}}>
Sign in

from react-native-button.

alvaromb avatar alvaromb commented on June 3, 2024

@skyride99 which Android version are you running on? I think that this happens under 4.3 or lower.

from react-native-button.

alvaromb avatar alvaromb commented on June 3, 2024

Ok, got it, you have to use a device with Android API 21+: https://github.com/facebook/react-native/blob/master/Libraries/Components/Touchable/TouchableNativeFeedback.android.js#L99-L100

Will change a few things to make the background prop optional.

from react-native-button.

alvaromb avatar alvaromb commented on June 3, 2024

Solved in https://github.com/APSL/react-native-button/releases/tag/v2.4.1.

You'll see a warning, it's due to this react-native issue facebook/react-native@28c0240

Thanks!

from react-native-button.

alvaromb avatar alvaromb commented on June 3, 2024

@bartonhammond you should update your fork with this version, fixes a problem with Android devices with API lower than 21.

from react-native-button.

bartonhammond avatar bartonhammond commented on June 3, 2024

Thanks for thinking of me, but No bueno, running npm test

 FAIL  src/components/__tests__/FormButton-test.js 
● Runtime Error
TypeError: Cannot read property 'style' of undefined
    at Object.eval (/Users/barton/projects/MFV/snowflake/node_modules/apsl-react-native-button/Button.js:19:25)
    at Loader._execModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:206:17)
    at Loader.requireModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:760:14)
    at Loader.requireModuleOrMock (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:790:19)
    at Object.eval (/Users/barton/projects/MFV/snowflake/src/components/FormButton.js:22:12)
    at Loader._execModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:206:17)
    at Loader.requireModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:760:14)
    at Loader.requireModuleOrMock (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:790:19)
    at Object.eval (/Users/barton/projects/MFV/snowflake/src/components/__tests__/FormButton-test.js:27:16)
    at Loader._execModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:206:17)
    at Loader.requireModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:760:14)
    at jasmine1 (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/testRunners/jasmine/jasmine1.js:233:16)
    at /Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/TestRunner.js:261:14
 FAIL  src/components/__tests__/Header-test.js 

from react-native-button.

alvaromb avatar alvaromb commented on June 3, 2024

This version has the same problem with the style prop in Jest @bartonhammond, but makes the component usable with Android devices using older API versions. Update your fork if you want support with older Android versions.

Enviado desde mi iPhone

El 6 feb 2016, a las 0:45, Barton Hammond [email protected] escribió:

Thanks for thinking of me, but No bueno, running npm test

FAIL src/components/tests/FormButton-test.js
● Runtime Error
TypeError: Cannot read property 'style' of undefined
at Object.eval (/Users/barton/projects/MFV/snowflake/node_modules/apsl-react-native-button/Button.js:19:25)
at Loader._execModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:206:17)
at Loader.requireModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:760:14)
at Loader.requireModuleOrMock (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:790:19)
at Object.eval (/Users/barton/projects/MFV/snowflake/src/components/FormButton.js:22:12)
at Loader._execModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:206:17)
at Loader.requireModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:760:14)
at Loader.requireModuleOrMock (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:790:19)
at Object.eval (/Users/barton/projects/MFV/snowflake/src/components/tests/FormButton-test.js:27:16)
at Loader._execModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:206:17)
at Loader.requireModule (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:760:14)
at jasmine1 (/Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/testRunners/jasmine/jasmine1.js:233:16)
at /Users/barton/projects/MFV/snowflake/node_modules/jest-cli/src/TestRunner.js:261:14
FAIL src/components/tests/Header-test.js

Reply to this email directly or view it on GitHub.

from react-native-button.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.