Skip to content

Rename start & end properties to fix conflict with RN 51#235

Merged
GantMan merged 1 commit intoreact-native-linear-gradient:masterfrom
sjmueller:master
Dec 20, 2017
Merged

Rename start & end properties to fix conflict with RN 51#235
GantMan merged 1 commit intoreact-native-linear-gradient:masterfrom
sjmueller:master

Conversation

@sjmueller
Copy link
Copy Markdown
Contributor

@sjmueller sjmueller commented Nov 16, 2017

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 #18: JSON
value '{
    x = 0;
    y = 0;
}' of type NSMutableDictionary cannot be converted to a YGValue.

This PR renames the values to avoid conflict, but keeps the JavaScript component API the same, thus preventing a breaking change.

@psyycker
Copy link
Copy Markdown

psyycker commented Dec 6, 2017

Please accept-it, I need it !

@MichaelDanielTom
Copy link
Copy Markdown

I just did the same thing for Android here FYI:
#242

@bilalsyed001
Copy link
Copy Markdown

#243

@imekinox
Copy link
Copy Markdown

+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.
```
@sjmueller
Copy link
Copy Markdown
Contributor Author

sjmueller commented Dec 14, 2017

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.

@afilp
Copy link
Copy Markdown

afilp commented Dec 18, 2017

Can you please merge this? Thanks!

@adamski
Copy link
Copy Markdown

adamski commented Dec 18, 2017

Also need this! Just updated to RN 0.51

@matthargett
Copy link
Copy Markdown

just FYI for @kevinvangelder : you'll need to update #145 once this is merged before that PR can be merged.

@GantMan GantMan merged commit 9e0e178 into react-native-linear-gradient:master Dec 20, 2017
@GantMan
Copy link
Copy Markdown
Collaborator

GantMan commented Dec 20, 2017

party2

@bmovement
Copy link
Copy Markdown

Trying to yarn upgrade this to no avail... should there have been an accompanying version bump, or am I doing something wrong? 😅

@hwangjr
Copy link
Copy Markdown

hwangjr commented Dec 21, 2017

But, We also need a new release for this pr. @GantMan

@adamski
Copy link
Copy Markdown

adamski commented Dec 21, 2017

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",

@GantMan
Copy link
Copy Markdown
Collaborator

GantMan commented Dec 21, 2017

Released 2.4.0

@entropitor
Copy link
Copy Markdown

@GantMan I still have the problem on 2.4.0 😞

@GantMan
Copy link
Copy Markdown
Collaborator

GantMan commented Jan 15, 2018

:( any idea on the fix?

machour added a commit to machour/git-point that referenced this pull request Jan 16, 2018
machour added a commit to machour/git-point that referenced this pull request Jan 16, 2018
Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235
machour added a commit to machour/git-point that referenced this pull request Jan 16, 2018
Upgrading react-native-linear-gradient is mandatory as it fixes a compatibility problem: react-native-linear-gradient/react-native-linear-gradient#235
chinesedfan pushed a commit to gitpoint/git-point that referenced this pull request Jan 27, 2018
* 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
@abeddow91
Copy link
Copy Markdown

abeddow91 commented Nov 28, 2018

also getting the same issue here with

└─ react-native-linear-gradient@2.5.2
└─ react-native: 0.57.7

any ideas?

rauljurado620 added a commit to rauljurado620/git-point that referenced this pull request Jun 15, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.