Rename start & end properties to fix conflict with RN 51#243
Rename start & end properties to fix conflict with RN 51#243bilalsyed001 wants to merge 1 commit intoreact-native-linear-gradient:masterfrom
Conversation
|
It may have been this: facebook/react-native@38b5506 |
|
@jdonisvitch I explained in the original PR #235 |
|
It must be merged, as soon as possible. |
| const { | ||
| children, | ||
| colors, | ||
| end, |
There was a problem hiding this comment.
According to my tests, we can get this working by only changing the native properties' names. That is, the public interface of LinearGradient can continue to use start and end and it only uses startPoint and endPoint internally. This way, we can temporarily switch to this branch or fork without having to change our application code. Once this issue is fixed by the RN team, we can simply revert back to the main npm package and, again, make no changes to our application code base.
There was a problem hiding this comment.
That is a really good point. It's not at the component level but at the internal level. Does the RN team believe this is a bug on their end?
There was a problem hiding this comment.
Well I don't think having more explicit methods like setStartPoint and setEndPoint internally is an issue. So I'd say if only the internal implementation is updated, there's no fix need in React Native (if there ever is going to be one), and the library can just move forward.
sibelius
left a comment
There was a problem hiding this comment.
it looks good, this should be a major version release
|
Per comment in #244, the index.d.ts typings file should also be updated to use "startPoint" and "endPoint" |
|
This changes the API. this should not be merged. in #235 @sjmueller was able to address the issue without changing the external API. This is strongly preferred |
|
I have updated my PR to support android, and it does not change the external API (as @raphaeleidus mentioned). |
|
+++ |
|
Can you please merge one or the other? We cannot release due to this and we cannot go back from 0.51 because 0.50 had another bug that was causing problems and now it is fixed. |
|
please merge this request, and release a new version, as soon as possible. thanks. @koenpunt |
|
Any word on this? I just updated to 0.51 and I really don't want to go back :| |
|
I need this fix... :/ |
|
It looks like #235 was merged instead. |
|
can we close this? |
|
I'm getting this issue now with react-native-linear-gradient@2.5.2 any ideas? |
|
Still happening: "react-native-linear-gradient": "^2.5.6", |

This works for both iOS and Android.
credit @sjmueller , @MichaelDanielTom