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

Allow running farming-hell in multiple tabs #2

Open
SquidDev opened this issue Nov 13, 2021 · 0 comments
Open

Allow running farming-hell in multiple tabs #2

SquidDev opened this issue Nov 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@SquidDev
Copy link
Owner

Currently you can only really run the app in one tab at once - if you open it in multiple ones, changes you make in one will override ones made in another. Ideally we'd sync data between all tabs, so changes made in one show up in others.

Basically:

  • Listen to StorageEvents.
  • When we receive an event, reload the store - we'll have to do some level of diffing here (probably just on the servant/item level) as otherwise this'll re-render the whole page.
  • Somehow get Formik to reload forms which haven't been touched at all. Unfortunately it appears changes to the initialValues prop aren't applied unless we specify enableReinitialize, but it's not clear if that's the behaviour we want either - to investigate!
@SquidDev SquidDev added the enhancement New feature or request label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant