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

feat: Add @data-client/react/redux #3099

Merged
merged 1 commit into from
Jun 14, 2024
Merged

feat: Add @data-client/react/redux #3099

merged 1 commit into from
Jun 14, 2024

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Jun 14, 2024

Motivation

Simpler installs - no longer need multiple extra packages. All react-related integrations in one package.

Solution

Add @data-client/react/redux

import {
  ExternalDataProvider,
  prepareStore,
  type Middleware,
} from '@data-client/react/redux';
import { getDefaultManagers, Controller } from '@data-client/react';
import ReactDOM from 'react-dom';

const managers = getDefaultManagers();
// be sure to include your other reducers here
const otherReducers = {};
const extraMiddlewares: Middleware = [];

const { store, selector, controller } = prepareStore(
  initialState,
  managers,
  Controller,
  otherReducers,
  extraMiddlewares,
);

ReactDOM.render(
  <ExternalDataProvider
    store={store}
    selector={selector}
    controller={controller}
  >
    <App />
  </ExternalDataProvider>,
  document.body,
);

Mark @data-client/redux as deprecated

Copy link

changeset-bot bot commented Jun 14, 2024

🦋 Changeset detected

Latest commit: ec91161

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

This PR includes changesets to release 3 packages
Name Type
@data-client/react Patch
@data-client/redux Minor
coinbase-lite Patch

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

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (b79a1f6) to head (ec91161).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3099   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         123      123           
  Lines        2204     2204           
  Branches      452      452           
=======================================
  Hits         2176     2176           
  Misses         17       17           
  Partials       11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ntucker ntucker marked this pull request as ready for review June 14, 2024 12:15
@ntucker ntucker force-pushed the redux-pkg branch 5 times, most recently from dd33a9e to 9a3fe7d Compare June 14, 2024 13:34
@ntucker ntucker merged commit 428ddd1 into master Jun 14, 2024
25 checks passed
@ntucker ntucker deleted the redux-pkg branch June 14, 2024 13:59
@github-actions github-actions bot mentioned this pull request Jun 14, 2024
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