What are our values for developer experience when installing Recharts? #5700
Replies: 2 comments 1 reply
-
I would agree with these although 1 comes to a point eventually where you have to make a decision. For example, dropping support for React 16.0 up to 16.8. We wanted to use hooks, we made that decision. What I want to avoid is a workaround to some problem for each version of a thing that we support. Thats hard to keep track of, hard to maintain, and just not a great DX overall. We want to majority to have the smoothest experience and only those that really have issues to be using overrides or off-install methods. I would put 2 over 1 IF this wasn't recharts, a library thats been around since 2016 when React 16 was the only react version used.
Not sure what you mean by this exactly. I think we should weigh all dependencies we install no matter what they are? Are you just saying check our dependencies we already have for libraries that we could re-use. i.e. if its already in the bundle we aren't adding to the bundle? |
Beta Was this translation helpful? Give feedback.
-
this if Recharts runs on React 16-19 and the parent app runs on 17 then we should reuse that instead of installing 19 which really I think goes without saying, why I mention it here explicitly is because of the ordering. So in other words, if I have to choose from two variants: A) Recharts requires special adjustments to install or B) Recharts installs easily ("the first guess is correct") and requires special adjustments to decrease bundle size I will choose B |
Beta Was this translation helpful? Give feedback.
-
I will kick off with my opinion. Here is what I value, in this order:
1. Compatibility
Keep compatibility range as wide as possible. Follow usage percents: if older version of a dependency is still popular, support it too.
2. Easy to install
Follow the conventions of each platform. Make the first guess to be the correct way to install Recharts.
So for example if I guess
npm install recharts
and run, that alone should be enough to get me started.Other examples:
yarn add recharts
"recharts": "latest"
topackage.json
file and then install3. Keep kilobytes down
Minimize the amount of dependencies that we bring. If the parent project already has a compatible version of a library, then we should aim to reuse that instead of bringing our own.
Only when the parent project does not have a dependency, or if the dependency is outside of valid range, then we install our own.
Beta Was this translation helpful? Give feedback.
All reactions