Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the d3-array dependency? #133

Open
pt8o opened this issue Dec 8, 2020 · 2 comments
Open

Removing the d3-array dependency? #133

pt8o opened this issue Dec 8, 2020 · 2 comments

Comments

@pt8o
Copy link

pt8o commented Dec 8, 2020

As you can see on Bundlephobia, the package d3-array currently comprises 40% of the total size of react-compound-slider! It's not the heaviest thing in the world but still, lightening the load is never a bad thing.

d3-array is used exactly once: its ticks function is used here

import { ticks } from 'd3-array';

I wonder if you'd consider extracting just the ticks function so the rest of d3-array doesn't need to be included?
https://github.com/d3/d3-array/blob/master/src/ticks.js

@sghall
Copy link
Owner

sghall commented Dec 27, 2020

Yeah, this is a fair point. I'm working on a refactor of this code. At the minimum could make it so you could tree shake that code.

@MaxboDev
Copy link

A problem i've noticed is that the version of d3 being used by react-compound-slider has some arrow functions in it which aren't transpiled. There may be other things that need transpiling too, but an arrrow function is where IE falls over for me. This makes react-compound-slider v3+ incompatible with IE 11. We've had to downgrade too 2.5.0 in order to use this library and remain compatible with IE.

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

No branches or pull requests

3 participants