Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
react-feathersjs
Advanced tools
Readme
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 0 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.