Skip to content

Conversation

@BenLorantfy
Copy link
Collaborator

@BenLorantfy BenLorantfy commented Aug 19, 2019

In this PR:

  • Copy code and tests from rbp to this library
  • Create API: createInjectorsEnhancer (new), injectSaga, useInjectSaga, injectReducer, useInjectReducer, forceReducerReload (new), SagaInjectionModes
  • Setup jest
  • Setup babel
  • Committed package-lock.json file. (This is where most of the "lines added" is coming from)
  • Ensure lodash imports aren't importing all of lodash

Still left TODO (In subsequent PRs):

  • Setup linting
  • Setup CI
  • Add docs
  • Setup cjs, es, and umd builds via bili
  • Create a PR into rbp removing injector code and setting up rbp to use this library

If I should do any of the above in this PR let me know, I just thought to keep this PR small-ish I would do these in subsequent ones.

A few other notes:

Pinning Dependencies in package.json

I don't know if this is a good idea for a library. I've been working recently on reducing my webpack bundle size, and I've noticed that pinned dependencies are more prone to being duplicated.

For example, if I pin "lodash" to 4.17.15 and a consumer of this library has a "lodash" version of ^4.20.0, this will cause two versions of "lodash" to be present in the bundle. If I had however specified ^4.17.15, then one version would be present in the bundle.

checkStore

This has been removed from the API.

@BenLorantfy BenLorantfy changed the base branch from master to dev August 19, 2019 18:32
@BenLorantfy BenLorantfy changed the title [WIP][Please do not review yet] Copy injector code from rbp [WIP][Please do not review yet] Copy injector code from rbp and expose api Aug 19, 2019
@BenLorantfy BenLorantfy changed the title [WIP][Please do not review yet] Copy injector code from rbp and expose api Copy injector code from rbp and expose api Aug 19, 2019
@BenLorantfy BenLorantfy force-pushed the move-code-from-react-boilerplate branch from 3f4e31c to b43f889 Compare August 23, 2019 13:04
@bwhitty
Copy link

bwhitty commented Aug 28, 2019

Hey @BenLorantfy fyi we've basically copy-pasted this code into a large monorepo setup and have validated that at least the raw injectReducer() and injectSaga() APIs work well!

Anything you need to help get this over the line?

@BenLorantfy
Copy link
Collaborator Author

Just waiting for a review

@BenLorantfy
Copy link
Collaborator Author

@justingreenberg @julienben @Gretzky Does anyone have a chance to review this?

Copy link
Member

@julienben julienben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! Here are some thoughts/comments.

Copy link
Member

@vineyardbovines vineyardbovines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have all the same comments as @julienben

Copy link
Member

@vineyardbovines vineyardbovines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(left one extra comment)

Copy link
Member

@julienben julienben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your diligence! Excited to see this come to fruition!

@BenLorantfy BenLorantfy merged commit 5b3b7b1 into dev Aug 29, 2019
@BenLorantfy BenLorantfy deleted the move-code-from-react-boilerplate branch August 29, 2019 16:54
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.

5 participants