HenrikJoreteg / redux-bundler

Compose a Redux store out of smaller bundles of functionality.
https://reduxbundler.com
583 stars 46 forks source link

Only check for required options #13

Closed greggb closed 6 years ago

greggb commented 6 years ago

actionBaseType should be optional, but the options checker looks for all fields to be not null.

The easiest way to do this seemed to be splitting out required from optional settings and running the check of merged options against the required options only. Hoisting the 'checker' also throws if name is missing before trying to split it.

In order to test this without repeating the getAsyncBundleStore I added an optional second parameter to merge any additional options into createAsyncResourceBundle.

Open to any feedback or changes!

HenrikJoreteg commented 6 years ago

thanks for fixing this stuff, @greggb 👍