Skip to content

Conversation

@dplewis
Copy link
Member

@dplewis dplewis commented Oct 31, 2022

New Pull Request Checklist

Issue Description

The metro-react-native-babel-preset turns arrow functions into anonymous functions by default.

new Promise((resolve, reject) => {} gets transpiled into

new Promise(function(resolve, reject) {
// Can't use this.getAsyncStorage() because of scope
});

Related issue: #1580

Approach

Remove getAsyncStorage wrapper

@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 31, 2022

Thanks for opening this pull request!

  • ❌ Please edit your post and use the provided template when creating a new pull request. This helps everyone to understand your post better and asks for essential information to quicker review the pull request.

@dplewis dplewis requested a review from a team November 1, 2022 17:35
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mtrezza mtrezza changed the title fix: transpiliing for react-native storage fix: React Native build does not maintain arrow functions and causes error with AsyncStorage Nov 1, 2022
@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: React Native build does not maintain arrow functions and causes error with AsyncStorage fix: react Native build does not maintain arrow functions and causes error with AsyncStorage Nov 1, 2022
@mtrezza mtrezza merged commit 8aeaa4f into parse-community:alpha Nov 1, 2022
parseplatformorg pushed a commit that referenced this pull request Nov 1, 2022
# [3.5.0-alpha.7](3.5.0-alpha.6...3.5.0-alpha.7) (2022-11-01)

### Bug Fixes

* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](#1587)) ([8aeaa4f](8aeaa4f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0-alpha.7

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Nov 1, 2022
parseplatformorg pushed a commit that referenced this pull request Nov 3, 2022
## [3.5.1-beta.1](3.5.0...3.5.1-beta.1) (2022-11-03)

### Bug Fixes

* File upload fails when uploading base64 data ([#1578](#1578)) ([03ee3ff](03ee3ff))
* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](#1587)) ([8aeaa4f](8aeaa4f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.1-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Nov 3, 2022
parseplatformorg pushed a commit that referenced this pull request Nov 3, 2022
## [3.5.1-alpha.1](3.5.0...3.5.1-alpha.1) (2022-11-03)

### Bug Fixes

* File upload fails when uploading base64 data ([#1578](#1578)) ([03ee3ff](03ee3ff))
* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](#1587)) ([8aeaa4f](8aeaa4f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.1-alpha.1

@dplewis dplewis deleted the rn-storage-fix branch November 9, 2022 18:27
parseplatformorg pushed a commit that referenced this pull request Nov 26, 2022
## [3.5.1](3.5.0...3.5.1) (2022-11-26)

### Bug Fixes

* File upload fails when uploading base64 data ([#1578](#1578)) ([03ee3ff](03ee3ff))
* React Native build does not maintain arrow functions and causes error with AsyncStorage ([#1587](#1587)) ([8aeaa4f](8aeaa4f))
* SDK builds incorrectly since release 3.5.0 causing various bugs ([#1600](#1600)) ([f15154f](f15154f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.1

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React Native build does not maintain arrow functions and causes error with AsyncStorage

3 participants