Naja is a modern, full-featured client-side AJAX library specifically designed for seamless integration with the Nette Framework. It provides robust capabilities for handling asynchronous requests, managing browser history states, and dynamically updating UI snippets, enabling developers to build highly interactive web applications with minimal JavaScript boilerplate. Currently stable at version 3.3.3, Naja maintains an active release cadence, frequently delivering minor enhancements and bug fixes. Key differentiators include its tight coupling with Nette's server-side AJAX responses, thorough testing across modern browsers (Chromium, Firefox, WebKit), and a strong focus on providing a reliable, performant AJAX experience tailored for the Nette ecosystem, allowing for progressive enhancement of traditional server-rendered applications. It is written using modern JavaScript and compiled for broad browser compatibility.
npm install najaVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to initialize Naja and subscribe to its core lifecycle events to handle Nette AJAX interactions and custom snippet updates.
Review any custom snippet handlers or extensions that interact directly with Naja's internal cache mechanisms. Test thoroughly to identify any regressions or changed behavior.
Adjust custom logic to listen for the `submit` event on the form element or use the `UIHandler.submitForm()` helper method (preferably `form.requestSubmit()` in modern browsers) for manual form submissions.
Always use `import naja from 'naja';` in your JavaScript/TypeScript files. Ensure your build system or Node.js environment is configured to handle ESM correctly.
Ensure `import naja from 'naja';` is at the top of your script and that the script is executed after Naja is loaded and parsed as an ES Module.
Verify that Naja is correctly imported as a module (`import naja from 'naja';`) and that your build/runtime environment supports ES Modules. Avoid relying on a globally exposed `naja` without proper import.
Review the Naja 3.x documentation for updated APIs and extension points. The internals for snippet caching and handler registration might have changed, requiring updates to custom extensions.
No dependency data recorded yet.