leecade / leecade/react-native-swiper
dotStyle Invalid prop
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi there I set the swiper like this:
<Swiper
...
dotStyle={styles.dotStyle}
...>
and in my style.js I set like this:
dotStyle: {
backgroundColor: 'white',
width: 4,
height: 4,
borderRadius: 2,
},
it warns like Warning: Faild prop type: Invalid prop 'dorStyle' of type 'number' supplied to '_class', expected 'obkect' ,but the styles works well.
if I set likedotStyle={{backgroundColor: 'white',width: 4,height: 4,borderRadius: 2,}}, there's not any warning.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Swiper component's dotStyle prop handling and compare the external style.js object with the equivalent inline object. Reproduce the prop-type warning shown in the issue; done means both forms apply the same styles without a warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100