Closed JKCooper2 closed 4 years ago
Do you actually have an error case or is this just a precaution
Merging #67 into next will decrease coverage by
1.28%
. The diff coverage is0%
.
@@ Coverage Diff @@
## next #67 +/- ##
==========================================
- Coverage 84.61% 83.33% -1.29%
==========================================
Files 6 6
Lines 65 66 +1
Branches 19 19
==========================================
Hits 55 55
- Misses 6 7 +1
Partials 4 4
Impacted Files | Coverage Δ | |
---|---|---|
src/components/MaterialTabs.tsx | 79.48% <0%> (-2.1%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update cfde9eb...bafdc28. Read the comment docs.
Without default value:
With default value:
Reason seems to be width (as well as _ and b) can be undefined. Not sure why, and only happens on android
bar.current.measure((_, b, width) => {
getTabWidth(width);
});
Entire error is:
ExceptionsManager.js:86 Invariant Violation: Invariant Violation: [2,10,{"type":"spring","overshootClamping":false,"restDisplacementThreshold":0.001,"restSpeedThreshold":0.001,"stiffness":1171.4,"damping":61,"mass":1,"initialVelocity":0,"toValue":"<
This error is located at: in MaterialTabs (at Tests.js:54)
Can I see what code you are using? Just want to make sure we fix the problem correctly
<MaterialTabs
barHeight={40}
uppercase
items={['Today', 'Week', 'All Forms']}
selectedIndex={selectedTab}
onChange={onTabPress}
barColor={colors.main.cpBlack}
indicatorColor={colors.main.cpOrange}
textStyle={[getTextStyles({ align: 'center', bold: true, color: colors.main.cpGreyDark }), { paddingBottom: 5 }]}
activeTextStyle={[getTextStyles({ align: 'center', bold: true, color: colors.main.white }), { paddingBottom: 5 }]}
/>
I was getting the same error with the default example provided. Only tested on Android simulator
@iRoachie Can this be merged in? Seems to be affecting on device android as well
Any update on where this is at?
On Android it seems measure can fire on a ref but sometimes return undefined for the width. Having a default value ensures it doesn't throw a
Malformed calls from JS: field sizes are different
error in this case