wix-incubator / repluggable

Pluggable micro frontends in React+Redux apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

upgrade to Redux Hooks

yumingsam opened this issue · comments

With the new Redux Hooks API (https://react-redux.js.org/api/hooks), code uses redux would be simpler. It resolves the pains of using redux by removing needs of mapStateToProps etc.

Does this sounds a good idea? How could replugable to integrate it? Is there a plan?

Sounds like a good idea, but needs to be thought through (It wasn't raised before, so no plan yet).
We will need to align it to core mechanics of Repluggable.

I'd imagine something like

useShellProps(shell => ({
  value: shell.getAPI(SomeAPI).getValue()
}), [boundShell])

useObservableProps(shell => ({
  value: shell.getAPI(SomeAPI).observables.value
}), [boundShell])

What do you think?
(Contributions are welcome BTW 😄 )

Thanks for your reply. I'm glad to know that would make replugable greater. I'd look forward to the support soon.
And will try to learn and think about the implementation.