Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix: use lodash version of unsupported Array.{fill, find} #1118

Merged
merged 4 commits into from
Mar 28, 2018
Merged

Conversation

samouss
Copy link
Collaborator

@samouss samouss commented Mar 27, 2018

Summary

Close #1115

@samouss samouss changed the title fl fix: use lodash version of unsupported Array.{fill, find} Mar 27, 2018
@samouss samouss requested review from vvo and Haroenv March 27, 2018 17:34
@algobot
Copy link
Contributor

algobot commented Mar 27, 2018

Deploy preview for react-instantsearch ready!

Built with commit 1766d70

https://deploy-preview-1118--react-instantsearch.netlify.com

@algolia algolia deleted a comment from algobot Mar 27, 2018
@@ -1,3 +1,4 @@
import { find, fill } from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

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

probably best to depend on /find and /fill ?

Copy link
Collaborator Author

@samouss samouss Mar 27, 2018

Choose a reason for hiding this comment

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

The babel-plugin-lodash handle that for us.

Copy link
Contributor

Choose a reason for hiding this comment

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

didn't know we used it 🙌

@vvo
Copy link
Contributor

vvo commented Mar 28, 2018

In the future if we want to get rid of lodash, maybe we can use the automatic polyfill features of babel? Any of you have experience using https://babeljs.io/docs/plugins/transform-runtime?

@Haroenv
Copy link
Contributor

Haroenv commented Mar 28, 2018

Would be better to use core-js directly rather than babel, I think that seems to be more of the recommendation. I fear that core-js is actually bigger than lodash usually though

@samouss
Copy link
Collaborator Author

samouss commented Mar 28, 2018

babel-runtime use core-js under the hood. I think it's the same at the end.

@samouss samouss merged commit ea7bf42 into master Mar 28, 2018
@samouss samouss deleted the fix/ie branch March 28, 2018 14:45
@vvo
Copy link
Contributor

vvo commented Mar 29, 2018

babel-runtime use core-js under the hood. I think it's the same at the end.

The good part versus using core-js is that I'd prefer to have a codebase that use RealJavaScript™️ whenever possible rather than relying on external modules inside the code itself.

If Babel is smart enough to import core-js automatically for us at compile time it's fine for me and a better solution. So incrementally you can remove those directives based on the browsers you support/browser evolution. Which is great!

samouss added a commit that referenced this pull request Apr 3, 2018
<a name="5.0.2"></a>

* use lodash version of unsupported Array.{fill, find} ([#1118](#1118)) ([ea7bf42](ea7bf42))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants