
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
apollo-prefetch
Advanced tools
Middleware, HOC, & utilities to prefetch view data in React + React-Router + Apollo projects.
Notice: this library has been used succesfully in production, but probably don't use it. It's here for reference, but I won't be putting more work into it.
For a more generic solution that will work with react-router
v4, try react-hydrate
.
Async middleware and utilities for prefetching data in React + React-Router + Apollo projects.
Inspired by AsyncProps and next.js.
npm i apollo-prefetch --save
Add asyncMiddleware
to your router instance:
import React from 'react'
import { Router, browserHistory, match, RouterContext } from 'react-router'
import routes from './routes'
import { store, client } from './store'
import { asyncMiddleware } from 'apollo-prefetch'
const Root = props => (
<ApolloProvider client={client} store={store}>
<Router
history={browserHistory}
routes={routes}
render={asyncMiddleware({
routes,
client,
store,
onLoad: () => console.log('Loading...'),
onComplete: () => console.log('Load Complete'),
})}
{...props.renderProps}/>
</ApolloProvider>
)
match({ browserHistory, routes }, (error, redirectLocation, renderProps) => {
if (error) throw new Error(error)
render(<Root renderProps={renderProps}/>, document.getElementById('root'))
})
MIT
FAQs
Middleware, HOC, & utilities to prefetch view data in React + React-Router + Apollo projects.
The npm package apollo-prefetch receives a total of 0 weekly downloads. As such, apollo-prefetch popularity was classified as not popular.
We found that apollo-prefetch 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.