Comments (10)
Thanks for the bug report @skyride99! Will take a look :)
from react-native-button.
Oh! by 0.18.1 you mean https://github.com/facebook/react-native/releases/tag/v0.19.0-rc ?
from react-native-button.
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.
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.
@skyride99 which Android version are you running on? I think that this happens under 4.3 or lower.
from react-native-button.
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.
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.
@bartonhammond you should update your fork with this version, fixes a problem with Android devices with API lower than 21.
from react-native-button.
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.
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)
- Support for testing HOT 6
- Unable to import module (with babel) HOT 1
- Default margin bottom HOT 2
- textStyleDisabled property HOT 1
- Default Jest test is failing HOT 1
- Align problem on RN 0.37.0 HOT 5
- The button layout is skewed when wrap with view component HOT 1
- when using The props or button loading will get a error , and other is work. HOT 4
- Is there an onActive style? HOT 1
- Solution for hiding a disabled button HOT 4
- Is it possible to show loading indicator and text together HOT 5
- set testID prop on TouchableHighlight for ios HOT 3
- Is it possible to change font color? HOT 1
- isLoading Issue with Android
- don't take effet when set flex HOT 2
- There is no disabledTextStyle prop HOT 1
- react native alert
- TouchableNativeFeedback should have same borderRadius, as inner View HOT 1
- Tests are broken and can't be run HOT 1
- TouchableOpacity HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-button.