
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
react-feathersjs
Advanced tools
This library offers a simple way to to connect your React application to your FeathersJS back-end. The library is isomorphic by nature so it's easy to use with both React and React Native.
Install the package:
yarn add react-feathersjs
or
npm i --save react-feathersjs
Then wrap your App in the FeathersWrapper component:
import React from 'react';
import { render } from 'react-dom';
import { FeathersProvider } from 'react-feathersjs';
import App from './src';
render(
<FeathersProvider>
<App>
</FeathersProvider>,
document.getElementById('app')
);
Then in your app:
// in src/App.js
import React from 'react';
import { connectFeathers } from 'react-feathersjs';
function App({ feathers }) {
console.log(feathers); // feathers client object is available for use!
return (
<div>
<h1>I love FeathersJS!</h1>
</div>
);
}
export default connectFeathers(App);
See /src/types.js for the props provided. Essentially what this does though is connect to a feathers back-end and then pass the feathers object through context to it's children.
A HOF that accepts a wrapped component as it's first parameter and an options object as it's second parameter. Currently, the only key in the options object is withRef which provides a ref for the wrapped component (this option is false by default). If you need to access the wrapped component then use the method getWrappedInstance().
Right now the library connects to your FeathersJS back-end through socket-io. In the future, I'd like to give the option to connect to a rest only back-end. I'd also like to rewrite the library in typescript. Help is always welcome :smile:
FAQs
React bindings for FeatherJS
The npm package react-feathersjs receives a total of 2 weekly downloads. As such, react-feathersjs popularity was classified as not popular.
We found that react-feathersjs 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.