Quantcast
Browsing all 1774 articles
Browse latest View live

[ANN] @greenfinity/rescript-vitest ported from @glennsl/rescript-jest

Hi there, I’ve created a rescript-vitest package by porting the existing rescript-jest package of @glennsl. https://github.com/greenfinity/rescript-vitest Motivation I am aware that there is already a...

View Article


Image may be NSFW.
Clik here to view.

Adding custom code formatting

Just getting in to ReScript and have found this a bit baffling. I’ve been using the IntelliJ plugin by @hgiraud which has been great so far, but I agree the default formatter is a bit brutal. I’m a...

View Article


Adding custom code formatting

There is no configuration, but there is “smart printing” for certain structures like pipe-chains or records. Have a look: [ANN] Smart linebreaks for pipe chains EDIT: Do you mean more than just one...

View Article

Image may be NSFW.
Clik here to view.

Adding custom code formatting

Thanks Florian, the smart line breaks look good in that context. Perhaps I’ve got any terminology wrong, but I think there’s a slight discrepancy in behavior when formatting ReScript code and JSX. It...

View Article

Adding custom code formatting

Ok now I understand it. Having consistency between the two syntaxes makes a lot of sense and I must have grown blind to it over the years. We also won’t need a config option for that IMO. I created an...

View Article


Adding custom code formatting

Excellent thank you!

View Article

JsxDOMStyle.t lacks some properties

React CSSProperties uses https://github.com/frenic/csstype which syncs with MDN. Could rescript-react JsxDOMStyle.t sync with MDN?

View Article

Image may be NSFW.
Clik here to view.

JsxDOMStyle.t lacks some properties

you can definitely open a PR to add props that would be missing or to sync JsxDOMStyle.t with MDN (a similar technique was recently used for the new experimental bindings to WebAPI. You can also...

View Article


JsxDOMStyle.t lacks some properties

Thank you. I opened a PR at main repo.

View Article


Tilia is born... still early version, ideas welcome :-)

Hello everyone, I just release @tilia/react (and @tilia/core). It’s a little state management library (using JS Proxy) inspired by Overmindjs (Greetings to Christian). The library is written in...

View Article

Error: Field value has a type which is less general than the (defined) scoped...

I get an error when I try to use a record type, a field of which is defined with a scoped polymorphic type. Code: module ColumnDef = { type cellProps<'tData, 'cellData> = {getValue: unit =>...

View Article

Tilia is born... still early version, ideas welcome :-)

Amazing work! it’s great to see people using ReScript to build libraries, once “library mode” lands, I think we could really make ReScript the best platform to create libraries targeting JS and TS....

View Article

Error: Field value has a type which is less general than the (defined) scoped...

I guess you’re trying to write bindings to TanStack. Unfortunately scoped polymorphic types are fairly limited and almost only work within bindings, they don’t play well when you write functions in...

View Article


Error: Field value has a type which is less general than the (defined) scoped...

I guess you’re trying to write bindings to TanStack. Yes. The binding work is making me regret my choice. Your solution works at first sight. I will test it out further when I get time. I guess the...

View Article

Image may be NSFW.
Clik here to view.

Tilia is born... still early version, ideas welcome :-)

Hello @tsnobip, Step 1 The first step is to build the library and then find a way to avoid relying on rescript for JS bindings. This means rewriting somb bindings by hand or use nullable instead of...

View Article


Tilia is born... still early version, ideas welcome :-)

This is very cool. But shouldn’t React props always be immutable?

View Article

Tilia is born... still early version, ideas welcome :-)

Fixed in 1.2.2. From my understanding, the part that should be immutable is the props object itself. Using a proxy with mutations as a prop value seems fine. But something that should not be done is...

View Article


How to use ocamldebug to debug the rescript-vscode analysis step by step?

Hi @Mng12345, I’m trying to run this as well after the code was moved from rescript-vscode to rescript. I keep running into: Loading program... Fatal error: cannot load shared library dllext_stubs...

View Article

Image may be NSFW.
Clik here to view.

Tilia is born... still early version, ideas welcome :-)

Great project! Like valtio but with Rescript bindings. I gave it a try because I needed to have observable data in React that could be changed outside of React. With React Context, one has to write a...

View Article

Image may be NSFW.
Clik here to view.

Tilia is born... still early version, ideas welcome :-)

Hi Czabaj, Thanks for your interest !! You should always track the whole tree, like this: let tree = Tilia.use(tree) Or if you receive a prop inside a component: let branch = Tilia.use(branch) This is...

View Article
Browsing all 1774 articles
Browse latest View live