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

@withease/redux #63

Merged
merged 56 commits into from
Dec 14, 2023
Merged

@withease/redux #63

merged 56 commits into from
Dec 14, 2023

Conversation

AlexandrHoroshih
Copy link
Collaborator

@AlexandrHoroshih AlexandrHoroshih commented Dec 11, 2023

import { createReduxIntegration } from '@withease/redux'

// app code
const myReduxStore = configureStore({
  // ...
});

const reduxInterop = createReduxIntegration({
  reduxStore: myReduxStore,
  setup: appStarted,
});

// user model
const $user = reduxInterop.fromState((x) => x.user);

const updateUserName = reduxInterop.dispatch.prepend((name: string) =>
  userSlice.changeName(name)
);

sample({
  clock: saveButtonClicked,
  source: $nextName,
  target: updateUserName,
});

Copy link

cloudflare-workers-and-pages bot commented Dec 11, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 08cb9fe
Status: ✅  Deploy successful!
Preview URL: https://f3bbf65e.withease.pages.dev
Branch Preview URL: https://feat-redux-interop-lib.withease.pages.dev

View logs

packages/redux-interop/src/lib/redux-interop.ts Outdated Show resolved Hide resolved
Renamed for better readability
Only latest release of 22 is allowed
@AlexandrHoroshih AlexandrHoroshih merged commit 2769175 into master Dec 14, 2023
7 checks passed
@AlexandrHoroshih AlexandrHoroshih deleted the feat-redux-interop-lib branch December 14, 2023 06:16
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