leecade / leecade/react-native-swiper

dotStyle Invalid prop

Open
#357 1 comment 0 reactions 0 assignees View on GitHub

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.

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.