Modernise codebase discussion
See original GitHub issueLooking to kickstart some discussion around modernising the code base and future features
- Switch to ES6 classes instead of
create-react-class
- much easier for newcomers to React to understand the code with this, plus it’s increasingly the recommended way across the ecosystem - Switch to ES6 for the codebase - (this isn’t a lot actually, mostly var ->
let/const
, arrow functions etc) - Use the
setState(fn)
form rather than thesetState(obj)
form in anticipation of priorities in fiber - Figure out build process if using ES6 (rollup/webpack + babel)
- Add support for
requestAnimationFrame
for high performance scroll listeners - Support passive event listeners for better perf
- In modern browsers with Intersection Observer support, use that instead of JS calculations (eventually over time this lib should become a wrapper around that w/ polyfill for older browsers?)
- More “functional” API (refer https://github.com/joshwnj/react-visibility-sensor/issues/74)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Understanding and Modernizing a Legacy Codebase
Understanding and Modernizing a Legacy Codebase ... we held an online discussion about the endpoint to allow everyone to ask questions about ...
Read more >How can I update a large legacy codebase to meet specific ...
I am looking specifically for incremental improvements that have been proven to be a success in the real world when updating a large...
Read more >5 Tips For Modernizing Legacy Code | designnews.com
First, as we have discussed, the team should understand where the code base currently stands. This should include understanding the current ...
Read more >[discussion] Environment specific modules with updates.
In the development environment: update the code base with new versions of modules. (composer update); run update hooks; export configuration.
Read more >3 Tips for Modernizing your iOS codebase | by Charlie Bartel
An elegant approach for migrating all your UIViewControllers to the replacement methods is discussed on Stack Overflow. - (void) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can check for passive scrolling support with this snippet:
First came across it in react-chatview
Any progress here?