Live data from Hacker News

Show HN: Fate, a new data framework for React and tRPC, inspired by Relay

github.com

1–4 of 4 posts

Re: Show HN: Fate, a new data framework for React and tRPC, inspired by Relay

#2
This provides plenty of value conceptually, but I wish they were able to push the syntax into a more intuitive place. My biggest gripe with Relay is how forced the syntax feels, and this seems better but still confusing. Take for example this component declaration:

export const PostCard = ({ post: postRef }: { post: ViewRef }) => { ... }

That feels terrible to me! I don't have any suggestion from my side, but I feel like there's got to be a less awkward way.

Re: Show HN: Fate, a new data framework for React and tRPC, inspired by Relay

#3
post #2

This provides plenty of value conceptually, but I wish they were able to push the syntax into a more intuitive place. My biggest gripe with Relay is how forced the syntax feels, and this seems better but still confusing. Take for example this component declaration: export const PostCard = ({ post: postRef }: { post: ViewRef }) => { ... } That feels terrible to me! I don't have any suggestion from my side, but I feel…

You don't have to rename the variable. You can also do this:

```

export function PostCard(props: { post: ViewRef }) {

  const post = useView(PostView, props.post);
}

```

If you add a few aliases (that can be easily generated), it becomes this:

```

export function PostCard(props: { post: PostViewRef }) {

  const post = useView(PostView, props.post);
}

```

There are many bits in fate worthy of criticism. Naming and typing React props really isn't one of those.

Re: Show HN: Fate, a new data framework for React and tRPC, inspired by Relay

#4
post #2

This provides plenty of value conceptually, but I wish they were able to push the syntax into a more intuitive place. My biggest gripe with Relay is how forced the syntax feels, and this seems better but still confusing. Take for example this component declaration: export const PostCard = ({ post: postRef }: { post: ViewRef }) => { ... } That feels terrible to me! I don't have any suggestion from my side, but I feel…

At least complain about something specific to the project and not generic TypeScript syntax.