![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.
bonaparte-core
Advanced tools
var bp = require('bonaparte');
Utility functions that should be used to handle attributes.
They automatically handle both name
and data-name
attributes in one go and normalize events across browsers.
Get an attribute from the given tag by attribute name. Automatically checks for data-[name] as well.
Return: attribute value.
bp.attribute.get(
(HTMLElement) element,
(String) attributeName,
)
Compares two attribute names and checks if they are the same with: "attributeName" === "data-attributeName"
Returns: true|false
bp.attribute.matchName(
(String) attributeName1,
(String) attributeName2
)
Removes an attribute from the given tag. Checks automatically if the attribute exists with or without data- prefix.
bp.attribute.remove(
(HTMLElement) element,
(String) attributeName
)
Set an attribute on the given tag. Checks automatically if the attribute exists with or without data- prefix.
bp.attribute.set(
(HTMLElement) element,
(String) attributeName,
(String) value
)
Combines modules into a new module
Returns a module.
var module = bp.modules.mixin(
(Function) module, // Modules to be combined
(Function) module, // Modules will be instanciated in the order they they are passed to the mixin funcition.
...
)
Modules are combinded to an
objct
. Read more about the objct library here
Traverses up the element tree to find the first element that matches the given selector.
Returns: Element|undefined
bp.tag.closest(
(HTMLElement) element,
(querySelector) selector
)
Checks one Element is placed inside another.
Returns: true|false
bp.tag.contains(
(HTMLElement) parent,
(HTMLElement) child
)
Creates a new bonaparte-tag from modules.
Returns Tag Factory.
var tag = bp.tag.create(
(String) name, // Tag name. "-bonaparte" is automatically appended.
(Array|Function) modules, // Modules the new tag includes.
[ (HTMLElement) htmlBaseElement ] // Define the html element this tag inherits from (Default: HTMLElement)
)
////////////
// Static functions
tag.register(); // Registers tag in HTML. After calling this function, the tag can be used in HTML.
tag.initialize( (HTMLElement) tag ); // Initializes the tag on an existion HTMLElement.
tag.mixin( (Array) mixins ); // Define mixins to chustomize existing tags behaviors.
The returned Tag Factory that can be.
tag.register()
tag.initialize(element)
tag.mixin(module)
A Tag Factory is an
objct
. Read more about the objct library here
Static methods on modules become static methods on the Tag Factory.
Calls the handler function when the DOM is ready. If the DOM is already completed, the handler is called imediately.
bp.tag.DOMReady(
(function) handler
)
Sets on observer on the given Element.
The observed element now emits bonaparte.tag.attributeChanged
and bonaparte.tag.attributeUpdated
events.
bp.tag.observe(
(HTMLElement) element
)
Triggers a event on the given HTMLElement
Returns: undefined
bp.tag.triggerEvent(
(String) event,
(HTMLElement) target,
(Object) data,
[(Boolean) bubbles = true ]
[(Boolean) cancelable=true]
)
FAQs
Bonaparte UX Framework Core
The npm package bonaparte-core receives a total of 4 weekly downloads. As such, bonaparte-core popularity was classified as not popular.
We found that bonaparte-core 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.