react-router-relay

[Deprecated] Relay Classic integration for React Router

Showing:

40 Versions

0.14.0

  • Breaking: Update for Relay v1.x API moves (#237)

0.13.8

  • Chore: Fix peer dependency ranges (#236)

0.13.7

  • Chore: Further update for React 15.5 deprecations (#233)

0.13.6

  • Chore: Update for React v15.5 deprecations (#231)

0.13.5

  • Bugfix: Only use legal characters in query config name (#197)

0.13.4

  • Bugfix: Use PropTypes.element instead of PropTypes.node where an element is expected (#185)
  • Chore: Add module entry point for webpack 2 (#186)

0.13.3

  • Bugfix: Improve error reporting when route with queries does not specify a component (#165)

0.13.2

  • Feature: Pass the base route element into the render callback as element, to better support dynamic route components and composition with other router middlewares (#154)

0.13.1

  • Bugfix: Missing Relay props should be null, not undefined (#148)

0.13.0

This is the same code as v0.13.0-rc.4. These release notes cover all changes since v0.12.2.

  • Breaking: Use <Relay.Renderer>-style API (#135)
    • Routes now take a single render callback instead of separate per-status callbacks, with similar semantics to <Relay.Renderer> (#135)
    • render callback also receives a routerProps object with the router props, even when Relay props are unavailable (#143)
    • <Router> object now requires an environment prop with the Relay environment (#135)
  • Breaking: Drop queryParams and stateParams in favor of an updated prepareParams (#137)
    • prepareParams now receives the router state as the second argument instead of the route (#141)
    • Fix handling of prepareParams for nested routes (#137)
  • Feature: Set route object as function context for route methods (#140)

0.13.0-rc.4

  • Feature: Add routerProps to render argument object that always has the router props (#143)
  • Bugfix: Do not pass props to render when data are not ready (#143)

0.13.0-rc.3

  • Breaking: Call prepareParams with router state instead of location (#141)
  • Feature: Set route as function context for route methods (#140)

0.13.0-rc.2

  • Bugfix: Include params from non-Relay routes (#139)

0.13.0-rc.1

  • Breaking: Use <Relay.Renderer>-style API (#135)
  • Breaking: Drop queryParams and stateParams in favor of an updated prepareParams method that now receives location instead of route for adding additional params (#137)

0.12.2

  • Minor: Add ES module build

0.12.1

  • Bugfix: Pass route props to renderFetched
  • Minor: Upgrade to Babel 6

0.12.0

  • Breaking: Rewrite as router middleware (#128)

0.11.0

  • Breaking: Move back to React Router (#122)

0.10.2

  • Feature: Allow specifying getQueries function for dynamic Relay queries (#120)

0.10.1

  • Feature: Allows specifying renderFailure, renderLoading, and renderFetched as objects keyed by component name (#177)

0.10.0

  • Breaking: Move from React Router to rrtr

0.9.5

  • Feature: Support non-scalar Relay route parameters from prepareParams

0.9.4

  • Bugfix: Pass the component key to the wrapped createElement function in <RouteContainer>

0.9.3

  • Bugfix: Fix forwarding props into route components

0.9.2

  • Minor: Fix a publishing error in v0.9.1

0.9.1

  • Feature: Add support for named components, courtesy @denvned

0.9.0

  • Breaking: Support React Router v2.x instead of v1.x

0.8.0

This is a relatively big release with significant breaking API changes.

The main change in this release is to move to a new top-level API made possible by new features in React Router. Now, instead of specifying createElement, you active the Relay integration by using <RelayRouter> or <RelayRoutingContext> as appropriate. This change lets us do a couple of new things:

  • We now support async components resolved via getComponent
  • We have a way to pass additional props like forceFetch to the Relay.RootContainer

There are a couple of smaller fixes included as well:

  • We preserve the signature of query functions, which fixes a bug when using non-shorthand queries against Relay v0.5.0
  • We now pass through readyState to the renderFetched handler as well

0.7.0

This updates the dependency versions for Relay and React Router.

0.6.2

Thanks to @josephsavona, we now have support for an additional prepareParams property on routes. Similarly to prepareVariables on a Relay container, prepareParams allows you to modify the params used for the Relay route. For example, you can use prepareParams to convert URL and query parameters from strings, and to initialize missing params with default values.

We've also bumped the React dependency from v0.14.0-rc1 to the final v0.14.0 release.

0.6.1

In some cases, the previous logic for generating unique query names based on referential equality of routes would break due to the route objects changing. This would lead to routes getting stuck in renderLoading forever due to changes in the generated unique query names. This release adds support for explicitly named routes, which allows us to match query names even when the route objects break referential equality.

0.6.0

  • Add support for Relay route parameters coming from location state
  • Only update the Relay route on actual location changes

0.5.0

This brings the package up-to-date with the recent changes in each of the major dependency packages.

0.4.5

This release adds hasVariable to RouteAggregator, which provides support for future releases of Relay that require this method on containers.

0.4.4

This release fixes the React Router peer dependency. We're only compatible with React Router 1.0.0-beta3 for now.

0.4.3

  • Match the new requirements for Relay containers in v0.2.1
  • Support using the same query for multiple routes

0.4.2

This adds back support for the case where a route component's parent calls React.cloneElement to inject additional props into the route component by passing through props into the wrapped component from containers.

0.4.1

Added a missing babel-runtime dependency.

0.4.0

We're now react-router-relay (instead of relay-nested-routes)!

@taion did some great refactoring with help from @cpojer to simplify the library while making it support more use cases.

Nested routes and queries are still aggregated up to a single Relay.RootContainer and dispatched in one go for batching and server side rendering, but now it's possible to provide RootContainer-esque functions on a per route basis like renderLoading, renderFetched, and renderFailed, in order to customize the experience for your app.

Thank you @taion and @cpojer for all your hard work!

0.1.0