My ever-growing rescript article series

I am writing a series of articles on writing a new rescript single-page-app from scratch. I’m brand new to the language and was mostly just documenting the gotchas I encountered as I went along. Thought it might be useful both to other newcomers and to those of you trying to improve the onboarding experience for such newcomers.

14 Likes

I’ve written a sequel article. There are four more articles in the pipeline and I’m still writing…

6 Likes

And once again, here’s the third article in the series:

6 Likes

I’m really enjoying these. I’m wondering if it would be worth changing just the 1st level bullets to be paragraphs? I think it would be easier to read, save more horizontal space, and still preserve the “stream of consciousness” style of the articles which I think works well.

Thanks for the feedback. I’ve been experimenting with this style of writing and have had my doubts about it. The truth is I have a lot of content I want to push out and a limited time to do it (I’m between jobs), so I’ve been pushing for quantity over quality. In a way, these are just an outline for a much more in-depth project (possibly a book) if I get the time.

That said, I think I’ll adjust the format for future articles. My blog theme is kinda messing with spacing (and syntax highlighting) and I don’t like it. I have quite a few articles queued up in this style, but I’ll switch for new ones.

1 Like

Great work on these articles.

+1 to removing bullets. I often read on mobile and the bullets take significant screen space, especially when nested.

For example:

And then further down in the article:

Thanks.

1 Like

Ouch! That’s enough justification to rewrite them all. Probably won’t take me too long, hang tight. :slight_smile:

2 Likes

First article has been debulleted. Will do the others over the weekend. Thanks for reading and the feedback!

1 Like

Have finished engishizing the other two articles. Working on the next one already.

4 Likes

Honestly, what I like from rescript is it’s routing is pretty simple, but may hard todo like matching with empty or “/”, but still, it’s better than react-router.

1 Like

Partially because the articles are taking more effort now, and partially because I’ll soon be starting a new job, I’ve decided to create a Patreon account for these articles. I will be posting them on Patreon two weeks before I move them to my public blog. I will not spam the forum with links to the Patreon account ( except this one :slight_smile: ), but will continue to post links when I make them public.

Here’s the next article in the series: https://www.patreon.com/posts/47509443

As a teaser, some of the content I’ve got in the pipeline includes creating an express server, css styling, binding to js functions, and an offline-enabled app, all in Rescript. I’m also thinking about graphql, and may also branch into writing about native apps in Reason.

2 Likes

Public articles have been updated to use @react/rescript instead of ReasonReact. I’ve also switched up the initialization step to use Rescript 9.0.0. But I’m not sure the two of them are cooperating…

1 Like

By the way – how are you doing syntax highlighting? I haven’t been able to find a JS highlighting library that knows ReScript yet. Thanks!

you can use this syntax file with highlightjs:

1 Like

I very sneakily set it to reason syntax, which seems close enough for now. :grin:

1 Like

I just published my latest article: A Couple React Components In Rescript. I hope you enjoy it.

There are also several articles available to subscribers on my patreon:

  • Firing Actions from Rescript React Components
  • Styling Rescript with Emotion
  • Using Rescript with NodeJs and Express
  • Modelling a third-party JS library in rescript
  • Modelling a third-party JS library in rescript, part 2

These will be published to my blog over the coming weeks.

4 Likes