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

Move the logic from @redux-devtools/app into @redux-devtools/app-core #1655

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matt-oakes
Copy link

This PR follows on from a previous discussion: #1653

This change splits out the main logic from the Redux Devtools App into a new core package but keeps the socket connection management in @redux-devtools/app. The aim is to allow for easier reuse of the rest of the app in other envioronments with their own transport methods, such as React Native or Electron.

The goal of this PR is that nothing will change for users of the @redux-devtools/app package. It re-exports all of the exports from @redux-devtools/app-core so everything that was previously available still is.

The majority of the PR is just moving files and changes to imports. Some changes needed to be made to allow for some actions, reducers, and middleware to be kept in @redux-devtools/app rather than moved to @redux-devtools/app-core. These are anything which relates to the management of the socket connection.

There is also a new prop on the App component which allows adding additional settings panels. This is used to add the "Connection" settings component, but not include it in the core package as it's specifically socket related. This poperty is optional to avoid any breaking changes.

Copy link

changeset-bot bot commented Apr 15, 2024

🦋 Changeset detected

Latest commit: 0a4089b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@redux-devtools/app-core Major
@redux-devtools/app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matt-oakes
Copy link
Author

I have made the changes needed for the linting and tests to pass correctly. I've also added a changeset file which will set the new app-core package to 1.0.0 and do a minor upgrade on the app package as it's not a breaking change.

You should have push access, so feel free to make changes or comments as required.

This change splits out the main logic from the Redux Devtools App into a new
core package but keeps the socket connection management in @redux-devtools/app.
The aim is to allow for easier reuse of the rest of the app in other envioronments
with their own transport methods, such as React Native or Electron.
@matt-oakes
Copy link
Author

Whoops! I fixed the small formatting issue. Sorry, my editor had a different way to automatically format that and I forgot to run the check formatting locally.

@matt-oakes
Copy link
Author

To test this out I have created an Expo Dev Plugin which makes use of this new app-core package (temporarily published to NPM as @mattoakes/redux-devtools-app-core).

It's working great and the amount of code needed to get the full devtools app UI with a custom connection middleware is now greatly reduced.

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.

None yet

1 participant