Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Fix recently introduced code regressions #49

Merged
merged 3 commits into from
Jan 20, 2020
Merged

Conversation

sebranly
Copy link
Owner

@sebranly sebranly commented Jan 19, 2020

Overview

Previously, two regressions were introduced as a compromise:

Now, both regressions are fixed.

Testing

  • npm run test should be ✅
  • App should be available on a real device (iPhone) after running npm run start

Additional information

For App/index.tsx I decided to use an initialReady props only for tests (so it's set to false if not present, for same behavior as what the app used to do). I could also have added an && process.env['NODE_ENV'] !== 'test' condition to the short-circuit (instead) but I find it a bit dirty. Reason behind all of it is that it looks difficult to simulate useEffect with react-native + the testing library (note: I tried out rerender to no luck): testing-library/react-testing-library#215

@sebranly sebranly added the wip This PR is work in progress label Jan 19, 2020
@sebranly sebranly removed the wip This PR is work in progress label Jan 20, 2020
@sebranly sebranly merged commit 8614739 into master Jan 20, 2020
@sebranly sebranly deleted the fix-regression-1 branch January 20, 2020 00:58
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.

1 participant