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.

22 Likes

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

8 Likes

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

7 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.

2 Likes

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.

2 Likes

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

4 Likes

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

4 Likes

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.

4 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.

5 Likes

The next article in the series is up: Firing Actions from Rescript React Components.

Thank you to @danielsdesk for becoming my first Patron! I commit to writing one article per month just for your support. :slight_smile:

I will be starting my next job on March 15th, so the series will probably slow down drastically, though I have weekly content queued up into April already.

5 Likes

Have added the next article: Styling in Rescript with Emotion. I’m still writing feverishly (new job starts on Monday, so I want to queue up a solid backlog). These articles are available on my Patreon account:

  • Using Rescript with NodeJs and Express
  • Modeling RxDB in Rescript Part 1
  • Modeling RxDB in Rescript Part 2
  • Modeling RxDB in Rescript Part 3
  • Accessing RxDB from React Components in Rescript
  • A GraphQL server in Rescript
  • Quickly refactoring with Rescript

Thank you to Josh Ellis and Prashant Pawar for becoming my latest patrons. Your support has given me more motivation to keep writing than I expected.

9 Likes

Just pushed out my latest article. In a brief departure from the ongoing React app, I took a moment to discuss writing a node/express app in Rescript.

I started my new job yesterday. It’s been an intense onboarding experience, and my final editing pass on this article ended up being a bit rushed. I hope enough of it makes sense to be useful. :slight_smile:

In the articles currently available on my Patreon account, I’m working towards building a complete progressive web app. Those will be rolling out to my blog over the coming months.

5 Likes

I generally mean to publish these on Tuesdays, but onboarding my new job has been taking up all available time, so it’s a little late!

My latest article is about modelling a complex JS library in Rescript. It’s part of a miniseries on modelling the RxDB database to create an offline-enabled application.

I wasn’t able to write any new content for my Patreon account this week, so I dipped into the backlog. I think I’ll have a little time to do a new one this weekend.

6 Likes