Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
nwl-components
Advanced tools
This project is a library of components to be used on the frontend of the Neuroweblab projects. They are similar in style and behaviour to existing projects.
This project is a library of components to be used on the frontend of the Neuroweblab projects. They are similar in style and behaviour to existing projects.
This project makes use of Vue SFCs: Single File Components, that have the .vue
extension.
They encapsulate the template, logic, and styling of a component in a single file, which makes sense for a library of components. Read more about SFC in the Vue documentation.
When a tag has the scoped attribute, its CSS will apply to elements of the current component only. This is similar to the style encapsulation found in Shadow DOM.
Read more on https://vuejs.org/api/sfc-css-features.html#scoped-css
The idea here is to encapsulate the appearance of components in the file they are defined, and not let in leak elsewhere.
The components make use of the Vue 3 Composition API which make code more reusable and to make it code more compact.
See below how we use composables to define access to the store methods and properties.
In the project, the store is comprised of the modules in src/store
.
Said modules are composables that consist of a main function, usually prefixed with use
, designed to expose stateful logic to other components.
They contain reactive objects and actions to update them that you can "inject" inside of other components.
The idea is to have a centralized way of performing CRUD updates on the stateful slices of data on which rely other components.
Pure components, also sometimes called dumb components, doesn't have any logic tied to them: they're just taking care of how the component look and behave according to props. They can emit events, but the listeners should be plugged in the parent components.
The parent components are said to be container components (or sometimes smart components) : this is where you actually define the logic and actions of updating the store or retrieving data from it. They're the one actually connected to the store, defined above.
This concept makes it possible to separate view and business logic. In the project, pure components are prefixed with Pure.
The components are documented through storybook, where you can see their props and see example use cases (for now we just have 'default' ones). Storybook stories are defined in files with the .stories.js
extension. It's a quite handy tool to develop a component in isolation of other components.
Run npm run storybook
to launch storybook.
To have a documentation always accessible, it could be possible to build storybook and publish it on Chromatic, for example through this Github Action.
FAQs
This project is a library of components to be used on the frontend of the Neuroweblab projects. They are similar in style and behaviour to existing projects.
The npm package nwl-components receives a total of 5 weekly downloads. As such, nwl-components popularity was classified as not popular.
We found that nwl-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.