Ember Router Service Refresh Polyfill

screenshot of Ember Router Service Refresh Polyfill
ember

Polyfill for RFC 631 https://emberjs.github.io/rfcs/0631-refresh-method-for-router-service.html

Overview

The ember-router-service-refresh-polyfill offers a solution for developers using Ember.js by enhancing the functionality of the RouterService. Inspired by RFC 631, this addon allows for the refreshing of all currently active routes, as well as specific routes if desired. It works seamlessly with Ember.js version 3.4 and above, making it a valuable addition for those looking to improve their routing experience.

Whether you're optimizing your application or simply need a more efficient way to handle route transitions, this polyfill brings essential features to the table, particularly for those working on projects running on compatible versions of Ember.js and Ember CLI.

Features

  • RouterService#refresh Method: Polyfills the RouterService#refresh method to allow for a full transition of all active routes or just specified ones.
  • Scoped Route Refresh: If a route name is provided, it refreshes that single route and its descendants, optimizing performance and user experience.
  • Full Transition Support: Ensures that all lifecycle hooks (resetController, beforeModel, model, afterModel, redirect, and setupController) are executed again for a fresh data set.
  • Transition Handling: Returns a Transition object that resolves once the refresh process completes, giving the developer control over application flow.
  • Compatibility: Designed for Ember.js v3.4 and above, and compatible with both Ember CLI v3.4 and above, as well as Node.js v12 or higher.
  • Optimized for Embroider: Safe to use with Embroider, ensuring that your projects remain optimized during the build process.
  • Disabled in Future Versions: It's worth noting that the polyfill is automatically disabled in Ember 4.1 and above, so it’s essential to consider your application’s future upgrades.
ember
Ember

Ember.js is a productive, battle-tested JavaScript framework for building modern web applications. It includes everything you need to build rich UIs that work on any device.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.