Skip to content

Installs Onyx from the react-native-onyx repo#784

Merged
marcaaron merged 16 commits into
masterfrom
tgolen-ion-dependency
Nov 11, 2020
Merged

Installs Onyx from the react-native-onyx repo#784
marcaaron merged 16 commits into
masterfrom
tgolen-ion-dependency

Conversation

@tgolen

@tgolen tgolen commented Nov 10, 2020

Copy link
Copy Markdown
Contributor

Held on Expensify/react-native-onyx#1

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/145302

Tests

  1. Run npm i && npm run web
  2. Make sure the app builds and works
  3. On web, open up the chat app in multiple tabs. Verify that the actions are synced across the tabs

@tgolen tgolen requested a review from marcaaron November 10, 2020 21:53
@tgolen tgolen requested a review from a team as a code owner November 10, 2020 21:53
@tgolen tgolen self-assigned this Nov 10, 2020
@botify botify requested review from bondydaa and removed request for a team November 10, 2020 21:53
Comment thread src/Expensify.js Outdated
[IONKEYS.SESSION]: {loading: false, error: ''},
}
},
onStorageEvent: addStorageEventHandler,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some comment about what this does might be useful here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if onStorageEvent is the best name for a method that does both the listening and the handling. I would expect the handler to take an argument of "event" but that's not really what's happening here.

I have two alternative suggestions:

  1. Change this to registerStorageEventListener like so
registerStorageEventListener: (onStorageEvent) => {
    listenToStorageEvents(onStorageEvent);
},
  1. Expose Ion.keyChanged() so it can be triggered externally without enforcing any opinions about what sorts of things should be able to trigger a keyChanged() event

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, those are good points. I agree with you. I like that first suggestion best since I think that changes the least about how the lib is supposed to work. I think we can perfect this later if we wish.

bondydaa
bondydaa previously approved these changes Nov 11, 2020
@marcaaron

Copy link
Copy Markdown
Contributor

Merge commit for JS-Libs here: Expensify/expensify-common@92b874e

@marcaaron marcaaron changed the title [HOLD React-Ion #1] Installs Ion from the React-Ion repo Installs Ion from the React-Ion repo Nov 11, 2020
@marcaaron

Copy link
Copy Markdown
Contributor

react-native-onyx Expensify/react-native-onyx@0cc1d0e

@marcaaron marcaaron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM just waiting for tests to finish

@marcaaron marcaaron changed the title Installs Ion from the React-Ion repo Installs Onyx from the react-native-onyx repo Nov 11, 2020
@marcaaron marcaaron merged commit 00565d1 into master Nov 11, 2020
@marcaaron marcaaron deleted the tgolen-ion-dependency branch November 11, 2020 20:20
elirangoshen added a commit to callstack-internal/Expensify-App that referenced this pull request May 18, 2026
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.

3 participants