![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Backbone View extension for managing subviews.
$ npm install --save vojvoda
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js"></script>
<script src="path/to/vojvoda.js"></script>
<script>
var SomeView = Vojvoda.extend({
// your view logic here
});
</script>
var _ = require('lodash');
var $ = require('jquery');
var Backbone = require('Backbone');
Backbone.$ = $;
var Vojvoda = require('vojvoda')(_, Backbone);
var SomeView = Vojvoda.extend({
// your view logic here
});
Vojvoda creates subViews
namespace inside of Backbone View.
Then by using only 3 methods, you can manipulate subviews without chance for creating memory leaks, ghost views, etc.
This method will create instance of class and add it to namespace.
name
(string) - key of sub view used for adding to namespaceclass
(object) - vojvoda or backbone viewoptions
any type - this will be passed to class for instantiationvar HomePageView = Vojvoda.extend({
initialize: function () {
this.addSubView('gallery', GalleryView, { model: new Backbone.Model(images) });
// this will create instance of GalleryView inside this.subViews
// so if you want to grab it: this.subViews.gallery.doSomething();
}
});
This method will destroy subview and all nested subviews recursivly.
name
(string) - key of sub view to destroyvar HomePageView = Vojvoda.extend({
initialize: function () {
this.addSubView('gallery', GalleryView, { model: new Backbone.Model(images) });
},
hide: function () {
this.destroySubView('gallery');
// this will delete gallery from this.subViews
// this will recursivly remove all subviews of gallery
// this will undelegate all events for this view
// this will call 'onDestroy' if it is defined
// this will call 'remove' method of view (by default remove element from DOM)
// this will call 'off' method of view
}
});
This method will destroy all subviews recursivly.
context
(object) - context used internally for recursionvar HomePageView = Vojvoda.extend({
initialize: function () {
this.addSubView('gallery', GalleryView, { model: new Backbone.Model(images) });
this.addSubView('breadcrumbs', BreadCrumbsView, { model: new Backbone.Model(breadcrumbs) });
},
hide: function () {
this.destroyAllSubView();
// this will run destroySubView for each subView
}
});
MIT © Aleksandar Gosevski
FAQs
Backbone View extension for managing subviews
The npm package vojvoda receives a total of 0 weekly downloads. As such, vojvoda popularity was classified as not popular.
We found that vojvoda demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.