I got a long weekend. I decided to see what React has been up to these days.

I happen to learn more about Suspense that now it allows f**king data fetching with relay.

I decided to give it a try . First time I am actually inclined towards trying out relay just so I can see what the f**king fuss about `Suspense` is all about.

Honestly the API is much better than what it looks like .

However what the fuck is this fucking relay. They have a page in their doc called glossary and most of the sections says TODO .

I wanted to see how the fuck data driven code splitting works . Due to the lack of proper documentation about it I could not get it right for two days . I stumbled upon couple of docs / blogs / github issues about it and then finally managed to get it working .

Well the end result wasn't as cool as I thought it would. The fucking API's to achieve this needless method of code splitting is insane
There are lot of better ways to achieve this with Suspense and the API relay offers is so shitty and not fucking type safe.

Now today I wanna learn more about the directives relay offers and there is no fucking documentation about them except for a fucking bold `TODO` explanation under the sections.

If relay developers thinks that they are fucking wizards and talk all about improving fucking performance . Please don't fucking over engineer API's and make it un un maintainable for the consumers of the library

Wow this feels good . first Day in rant and I m feeling great

  • 1
    That's what you get for trying to try the newest additions.
  • 2

    TBH this feature isn't quite new , data driven dependencies in relay was introduced in 2019 .

    May be the suspense integration was included recently but I seriously did not have any problem with the Suspense integration
  • 0
    @vijayk93 i wonder, what is the use case for the relay and suspense?
  • 0
    We just wrote a fetch wrapper in typescript so we can do things like

    const getThing = (): Promise<Thing> => {....

    return Promise...



    //called from inside TS Generators.

    const thing = yield getThing();

    And we used react-promise-tracker in our service layer so we wrote our own <Suspense thing where it's like

    <Suspense tag={serviceTags.getThing} waitingElement={<p>Loading...</p>}>

    { store.thing }

Add Comment