Quantcast
Channel: ReScript Forum - Latest posts
Browsing all 1759 articles
Browse latest View live

Type level function for tracking observable behavior

You want HKT or dependent type? I think there’s no way to model it fully, so I’ll quickly compromise. If you can accept adding some runtime for it then may be possible to manage the transformation...

View Article


Type level function for tracking observable behavior

can you give more in that example? I love a GADT, but is that supposed to be the typing for observables themselves? Thanks A

View Article


Type level function for tracking observable behavior

No. I meant you need to box you parameters and generalize observer side, not observable itself.

View Article

Image may be NSFW.
Clik here to view.

[ANN] rescript-rest - RPC-like client, contract, and server implementation...

rescript-rest@0.2.0 is out! Now, it’s possible to define headers and query params with superb DX and total type-safety. Hence, here’s the updated Super Simple Example from the docs:

View Article

Variant unwraping

Hello. I’m trying to write bindings for ags ags docs type baseProps = { name: string } module Label = { type t type props = { ...baseProps, label?: string, } @val @scope("Widget") external make: props...

View Article


Variant unwraping

Hi L33! I’ll try to answer you though I have zero knowledge of AGS. Be careful, you’re mixing record and object type declarations, you probably want to define records here since, they’re overall...

View Article

Variant unwraping

Thank you for your answer. It solves my problem.

View Article

Tailwind CSS: adding `className` to components

Is there a better way to add className to react native (that does not involve creating the _props type by hand) ?

View Article


Image may be NSFW.
Clik here to view.

Is there a reason the pipe operator doesn't allow spaces?

I agree with you here. The choice of this operator to make it “look like OOP access” does not feel amazing to me. The pipe |> would have been less confusing… I also don’t understand why an infix...

View Article


Why does the "pipe" operator have a higher precedence?

// This does not compile because `->` has a higher precedence than `+`. let foo = 3 + 4 -> Int.toString What was the rationale behind this choice of precedence? Really curious. The low...

View Article

Rescript Relay connecting mutation with refechable pagination

While playing with Rescript Relay I encountered a problem with connections. That might be mostly Relay related problem but because I’m new to relay I’m not sure if I do something wrong with Rescript...

View Article

Rescript Relay connecting mutation with refechable pagination

If you use @prependEdge or @appendEdge in the mutation and pass it the connection ID, you should achieve exactly what you’re looking for. You can follow rescript relay tutorial here.

View Article

Rescript Relay connecting mutation with refechable pagination

I do: module AddMutation = %relay(` mutation AlbumRelayAddMutation( $input: CreateAlbum!, $connections: [ID!]! ) { createAlbum(input: $input) @prependEdge(connections: $connections) { node {...

View Article


Rescript Relay connecting mutation with refechable pagination

I don’t understand why you need a useEffect if you use @prependEdge or is it just to update the results when you change the filter? But then why adding album nodes length to the dependencies?

View Article

Why does the "pipe" operator have a higher precedence?

I guess @cristianoc or @Maxim would know?

View Article


Image may be NSFW.
Clik here to view.

Rescript Relay connecting mutation with refechable pagination

I apply the filter dynamically and I don’t know a better way to tell usePagination that I want to update it

View Article

Rescript Relay connecting mutation with refechable pagination

do you have maybe a published repro or is your project open source? How do you get the connection ID? Because the connection ID depends on the filter too.

View Article


Image may be NSFW.
Clik here to view.

[ANN] rescript-rest - RPC-like client, contract, and server implementation...

rescript-rest@0.3.0 is out! Made ~variables in the call function a non-labeled argument Added support for path parameters Define your API contract somewhere shared, for example, Contract.res: let...

View Article

Image may be NSFW.
Clik here to view.

Rescript Relay connecting mutation with refechable pagination

I use examples from tutorial (mutation step 4). In my example I use “composer”: module AlbumRelayComposerFragment = %relay(` fragment AlbumRelayComposerFragment on Viewer { __id } `) I use it in...

View Article

Rescript Relay connecting mutation with refechable pagination

module Fragment = %relay(` fragment AlbumRelayContent_albums on Viewer @refetchable(queryName: "AlbumRelayPaginationQuery") @argumentDefinitions( cursor: { type: "String" }, count: { type: "Int",...

View Article
Browsing all 1759 articles
Browse latest View live