leozdgao / react-async-script-loader

A decorator for script lazy loading on react component
MIT License
258 stars 55 forks source link

Script source(s) as function (props => sources) #30

Closed cdelaorden closed 1 year ago

cdelaorden commented 6 years ago

Adds feature #29

Much like connect from Redux, if sources is a function then call that function with the decorated component props to generate the final script sources to load.

Pull request includes automatic Prettier code formatting (sorry about that not intended), a new test to verify the functionality and the simple change to the container to calculate the scripts to load in the constructor.

cdelaorden commented 6 years ago

I noticed the checks, the AppVeyor error is chinese to me and the Travis CI environments seem quite old to me (node 0.10, node 0.12 and so on), even const is not accepted. :) Anything missing on my side?