Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
appfairy-react
Advanced tools
A patch on top of React for Appfairy/React apps.
import Appfairy from 'appfairy'
import ReactDom from 'react-dom'
import React from 'react'
class MyComponent extends React.Component {
button = React.createRef()
render() {
return (
<af-my-element-view>
<af-proxy
af-plug="button"
ref={this.button}
history={new Appfairy.Reference(this.props.history)}
onClick={this.handleClick}
/>
</af-my-element-view>
)
}
handleClick = (e) => {
e.nativeEvent.origin.preventDefault()
console.log(this.button.current.afSocket, 'clicked')
}
}
class MyElement extends Appfairy.Element(HTMLElement) {
render(container, props) {
return ReactDOM.render(
<MyComponent {...props} />
, container)
}
}
Appfairy.Element.define('my-element', Element)
import React from 'appfairy-react'
@React.Element('my-element')
class MyComponent extends React.Component {
button = React.createRef()
render() {
return (
<af-my-element-view>
<af-proxy
af-plug="button"
ref={this.button}
history={this.props.history}
onClick={this.handleClick}
/>
</af-my-element-view>
)
}
handleClick = (e) => {
e.nativeEvent.preventDefault()
console.log(this.button.current, 'clicked')
}
}
Rather than import appfairy-react
all the time, you can just use the patch()
method and then use react
as usual:
// main module
import AppfairyReact from 'appfairy-react'
AppfairyReact.patch()
// any other module which uses jsx
import React from 'react'
FAQs
A patch on top of React for Appfairy/React apps
The npm package appfairy-react receives a total of 12 weekly downloads. As such, appfairy-react popularity was classified as not popular.
We found that appfairy-react 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.