Current <Set /> fixes + improvements in progress for v0.28

Redwood v0.28 introduced a great new Router feature called Sets, which allows you to effectively wrap your routes in layouts and contexts. There’s a Forum post here and the docs are over here.

Current Status as of v0.28.2

Overall, using <Set> as a way to wrap other components around a group of routes is working great. We definitely encourage people to try it out in their applications. If you are running Redwood in production, you can try Sets for simple use cases, however, there are known outstanding issues (see below) — we recommend waiting for patch release v0.28.3

Most importantly, if you use <Set> please give us your feedback and wish lists! People are already coming up with new use cases and requesting additional features. We really think you’re going to be inspired in the same way!

Lastly, if you do encounter any new bugs, please let us know via a GitHub Issue so we can turn around a patch asap.

Outstanding Issues

There are two known bugs :bug: we’re currently resolving.

Sets are not “Auth aware”

As of v0.28.2, sets cannot be used with Authentication. However, a patch has already been merged (see PR#2147) and will be included in v0.28.3

Route Params + Redirect = :x:

Using route parameters (useParams()) in a layout that’s wrapped around your routes, together with a <Redirect /> in one of your pages, will cause an extra re-render of your Set. The extra re-render of your set will have empty params, which will be a fatal error if you’re relying on those params. Additionally, we are assessing whether or not there are other cases of unintended rendering.

The resolution is in progress via PR#2149

When to expect fixes via v0.28.3

Once the useParams issue is resolved, we will publish a patch release v0.28.3, which you can expect to be completed within a day or two.

In the meantime, please let us know if you have any further questions or need help via comments below.

4 Likes