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

Search with effector #80

Merged
merged 4 commits into from Jul 10, 2019

Conversation

Projects
None yet
3 participants
@Djelnar
Copy link
Member

commented Jul 3, 2019

No description provided.

@sergeysova sergeysova self-requested a review Jul 3, 2019

@sergeysova sergeysova self-assigned this Jul 3, 2019

@Djelnar Djelnar added the help wanted label Jul 5, 2019

Djelnar added some commits Jun 30, 2019

feat(app): router hooks
Add react hooks to use react-router

@sergeysova sergeysova force-pushed the feat/search-effector branch from e2d69bc to b74b436 Jul 9, 2019

}
})

search.watch((query) => {

This comment has been minimized.

Copy link
@sergeysova

sergeysova Jul 9, 2019

Member
forward({ from: search, to: searchCardLoading })

export const $searchHistory: Store<string[]> = createStore([])

export const appendToSearchHistory: Event<string> = createEvent()

This comment has been minimized.

Copy link
@sergeysova

sergeysova Jul 9, 2019

Member

All events should be named in a past simple.

@sergeysova sergeysova force-pushed the feat/search-effector branch from 45e1d56 to 2db27bd Jul 9, 2019

@sergeysova sergeysova requested a review from stuneak Jul 9, 2019

usefulMarkClicked,
(registry, cardId) => registry[cardId],
).watch((card) => {
if (card) setUsefulMark({ cardId: card.id, isUseful: !card.meta.isUseful })

This comment has been minimized.

Copy link
@Kelin2025

Kelin2025 Jul 9, 2019

You can get rid of .watch there

const evt = sample(
  $registry,
  usefulMarkClicked,
  (registry, cardId) => registry[cardId]
)
  .filter({ fn: card => card })
  .map(card => ({ cardId: card.id, isUseful: !card.meta.isUseful }))

forward({ 
  from: evt, 
  to: setUsefulMark 
})

@sergeysova sergeysova force-pushed the feat/search-effector branch 2 times, most recently from ddcf09e to 456e8af Jul 9, 2019

@sergeysova sergeysova self-requested a review Jul 10, 2019

@sergeysova sergeysova removed the help wanted label Jul 10, 2019

@sergeysova sergeysova force-pushed the feat/search-effector branch from 456e8af to e41694c Jul 10, 2019

@sergeysova sergeysova merged commit e1ae161 into dev Jul 10, 2019

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@sergeysova sergeysova deleted the feat/search-effector branch Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.