Open RyanNerd opened 2 years ago
A good solution may be to move @types/react
to a peer dependency that supports either 16.x or 17.x, as bumping it to 17.x could be a breaking change for users still using 16.
A good solution may be to move
@types/react
to a peer dependency that supports either 16.x or 17.x, as bumping it to 17.x could be a breaking change for users still using 16.
Perhaps this change?
"peerDependencies": {
"@types/react": "^16.8.0 | ^17.0.2"
}
I moved my TypeScript defs to DevDependencies which solved the bloat issue.
To reduce bloat I try to have all my imports use reactn. For example:
import React, {useEffect, useState} from 'reactn';
However, with some more esoteric imports I am forced to import from React:import {InputHTMLAttributes} from 'react';
Bumping the
@types/react
to the latest version may also resolve this issue #98Also, since I am using the latest React version when I do an NPM install I have to use the
--force
switch. Here's the NPM Error vomit: