Rename start & end properties to fix conflict with RN 51#235
Rename start & end properties to fix conflict with RN 51#235GantMan merged 1 commit intoreact-native-linear-gradient:masterfrom
Conversation
|
Please accept-it, I need it ! |
|
I just did the same thing for Android here FYI: |
|
+1 Please I need it too. |
A recent commit in RN added start/end properties to RCTViewManager. Because LinearGradient inherits from this class and has properties of the same name, RN gets mixed up and tries to convert to a YGValue instead of CGPoint, which results in the exception: ``` Error setting property 'start' of BVLinearGradient with tag react-native-linear-gradient#18: JSON value '{ x = 0; y = 0; }' of type NSMutableDictionary cannot be converted to a YGValue. ```
|
Hey folks, I have updated this PR (thanks @raphaeleidus) to support android as well. I know there have been several follow up PRs since my original submission and it's gotten a bit confusing -- hopefully this now takes care of everything and we can get it merged. |
|
Can you please merge this? Thanks! |
|
Also need this! Just updated to RN 0.51 |
|
just FYI for @kevinvangelder : you'll need to update #145 once this is merged before that PR can be merged. |
|
Trying to |
|
But, We also need a new release for this pr. @GantMan |
|
For the impatient, just add the git url to your package.json: "react-native-linear-gradient": "git+https://github.com/react-native-community/react-native-linear-gradient.git", |
|
Released 2.4.0 |
|
@GantMan I still have the problem on 2.4.0 😞 |
|
:( any idea on the fix? |
Also needed to update react-native-linear-gradient: react-native-linear-gradient/react-native-linear-gradient#235
Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235
Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235
* chore: Upgrade react, react-dom, react-native to latests versions Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235 * chore: upgrade react-dom as well * chore: fix whitespaces * refactor: delete empty line
|
also getting the same issue here with └─ react-native-linear-gradient@2.5.2 any ideas? |
* chore: Upgrade react, react-dom, react-native to latests versions Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235 * chore: upgrade react-dom as well * chore: fix whitespaces * refactor: delete empty line

A recent commit in RN added start/end properties to RCTViewManager.
Because LinearGradient inherits from this class and has properties of
the same name, RN gets mixed up and tries to convert to a
YGValueinstead of
CGPoint, which results in the exception:This PR renames the values to avoid conflict, but keeps the JavaScript component API the same, thus preventing a breaking change.