Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@coorpacademy/components
Advanced tools
This library provide sharable components for web applications, either :
sitejekyll.coorpacademy.com
@todo
list npm run
scripts
npm install
npm start
Then open http://localhost:3000
/lib
in a projectnpm link
to create a local @coorpacademy/components
packagenpm link @coorpacademy/components
in your project.@todo
example + howto
hyperscript
function, the cloning, and the vtree resolving.import renderer from '../../src/renderer/react';
import createElement from './element';
const Element = createElement(renderer);
Element
being something like:
export default ({h}) => (props) => (
<p>
{props.children}
</p>
)
@todo
explain renderer.resolve
and renderer.walker(renderer.resolve)
It's possible to enhance a Component
by applying a specific behaviour on it.
Alike every Component
, this behaviour is a kind of MetaComponent
, created with the renderer
and 'wrapped' around the Component
to enhance.
const Component = createComponent(renderer)
const CustomBehaviour = createCustomBehaviour(renderer)
<CustomBehaviour>
<Component>
</Component>
</CustomBehaviour>
Wrappers
allow to modify the child's props.
<ForceColor {color: 'red'}>
<Component {color: 'blue'}>
</Component>
</ForceColor>
With this kind of Wrapper
, the Component
will have its blue
props.color overriden by the red
value.
Behaviours
allow to modify a child's behaviour, like its style
It's the same job as wrappers
but applying the modification directly on the resolved vTree.
With a Behaviour
the previous example would become :
const Component = createComponent(renderer)
const RedColor = createRedColor(renderer)
<RedColor>
<Component>
</Component>
</RedColor>
Here the Component
props.style.color
will be set by the Behaviour
.
Both Wrappers
and Behaviours
may be used as decorator to allow smaller, readable jsx
:
const Component = createComponent(renderer)
const RedColor = createRedColor(renderer)
const RedComponent = RedColor.decorate(Component);
<RedComponent>
</RedComponent>
Here the RedComponent
is exactly the same as the previous example for Behaviour
.
FAQs
This library provide sharable components for web applications, either :
The npm package @coorpacademy/components receives a total of 3,564 weekly downloads. As such, @coorpacademy/components popularity was classified as popular.
We found that @coorpacademy/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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.