wufe / react-particles-js

Particles.js for React
https://rpj.bembi.dev/
MIT License
1.15k stars 106 forks source link

A fix for issue #75 : switch to strict typescript #76

Closed Reggino closed 5 years ago

Reggino commented 5 years ago

Issue #75 is caused by calling a method on a piece of state that's sometimes undefined. (In this case, it's caused by the line this.state.library.destroy(); and this.state.library does not exist in some weird situations)

Using "strict" typescript should make these kind of things easier to detect.

omarryhan commented 5 years ago

@Wufe Any chance we're getting this merged? Unfortunately, the fix mentioned in issue #75 doesn't entirely solve the problem.

wufe commented 5 years ago

Thanks for your PR. It has been merged on commit 2e11ef693c2994d21a41f0904362a88b9a0f19a4. However since I prefer not to switch to strict typescript, I reverted tsconfig.json and webpack.config.js.