Skip to content

Commit 3a27cb3

Browse files
committed
add more links
1 parent 585e0df commit 3a27cb3

File tree

5 files changed

+60
-62
lines changed

5 files changed

+60
-62
lines changed

data/resources.json

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,2 @@
1-
[
2-
{
3-
"title": "Getting rid of your dead code in ReScript",
4-
"description": "Exploring ReScript's tools for eliminating dead code, keeping your repository clean and without... Tagged with rescript.",
5-
"image": "https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12lsasc06v1a355i6rfk.jpeg",
6-
"url": "https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba"
7-
},
8-
{
9-
"title": "Belt.Array vs Js.Array in Rescript",
10-
"description": "You might have noticed that there are several ways in Rescript for iterating through elements of an array. It’s not at all obvious which one you should be using…",
11-
"image": "https://www.daggala.com/static/30b47dd2b0682e7eb0279b85bc9ebb53/f3583/toolbelt.png",
12-
"url": "https://www.daggala.com/belt_vs_js_array_in_rescript/"
13-
},
14-
{
15-
"title": "From TypeScript To ReScript | Serhii Potapov (greyblake)",
16-
"description": "A blog about software development.",
17-
"image": "https://www.greyblake.com/greyblake.jpeg",
18-
"url": "https://www.greyblake.com/blog/from-typescript-to-rescript/"
19-
},
20-
{
21-
"title": "Full-stack ReScript. Architecture Overview",
22-
"description": "Can ReScript be used to create a full-featured back-end? In this article, I’d try to prove it can and does it with success.\n",
23-
"image": "",
24-
"url": "https://fullsteak.dev/posts/fullstack-rescript-architecture-overview"
25-
},
26-
{
27-
"title": "ReScript for React Development",
28-
"description": "Looking for ReScript for React Development information? In this article, I highlight the development & business advantages of ReScript.",
29-
"image": "https://scalac.io/wp-content/uploads/2021/08/ReScript-for-React-Development-FB.png",
30-
"url": "https://scalac.io/blog/rescript-for-react-development/"
31-
},
32-
{
33-
"title": "Rewriting a Project in ReScript",
34-
"description": "My experience reimplementing a small project in ReScript",
35-
"image": "",
36-
"url": "https://yangdanny97.github.io/blog/2021/07/09/Migrating-to-Rescript"
37-
},
38-
{
39-
"title": "Responsive Images and Cumulative Layout Shift",
40-
"description": "Solving cumulative layout shift issue caused by responsive images in layouts.",
41-
"image": "https://d20bjcorj7xdk.cloudfront.net/eyJidWNrZXQiOiJpbWFnZXMuYWxleGZlZG9zZWV2LmNvbSIsImtleSI6Im1ldGEtYmxvZy5wbmciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjEyMDAsImhlaWdodCI6NjMwLCJmaXQiOiJjb3ZlciJ9LCJqcGVnIjp7InF1YWxpdHkiOjkwfX19?signature=d8e6c0ac1ff03d0f5ee04d128b96a7701b998952a38ba96e9a16e4414cd05ed0&version=58cfd6f8abdefeca2195a6a1f1108596",
42-
"url": "https://alexfedoseev.com/blog/post/responsive-images-and-cumulative-layout-shift"
43-
}
44-
]
1+
[{"title":"JavaScript schema library from the Future 🧬","description":"ReScript Schema - The fastest parser in the entire JavaScript ecosystem with a focus on small bundle... Tagged with schema, typescript, rescript, opensource.","image":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn102ksd9w1xo5ysgxbur.png","url":"https://dev.to/dzakh/javascript-schema-library-from-the-future-5420"},{"title":"ReScript: A Better Typed JavaScript? (with Gabriel Nordeborn)","description":"ReScript is a strongly-typed programming language that compiles to JavaScript, and that puts it squarely in competition with TypeScript. So why would a JavaS...","image":"https://i.ytimg.com/vi/yKl2fSdnw7w/maxresdefault.jpg","url":"https://www.youtube.com/watch?v=yKl2fSdnw7w"},{"title":"An early look at @rescript/webapi","description":"Here's an early look at the new ReScript Web API bindings I've been working on.For more information, visit https://rescript-lang.github.io/experimental-rescr...","image":"https://i.ytimg.com/vi/MC-dbM-GEuw/maxresdefault.jpg","url":"https://www.youtube.com/watch?v=MC-dbM-GEuw"},{"title":"ReScript has come a long way, maybe it's time to switch from TypeScript?","description":"ReScript, the \"Fast, Simple, Fully Typed JavaScript from the Future\", has been around for awhile now.... Tagged with rescript, javascript, typescript, webdev.","image":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jrqcbteob11bc7nvwz9.jpg","url":"https://dev.to/jderochervlk/rescript-has-come-a-long-way-maybe-its-time-to-switch-from-typescript-29he"},{"title":"Create a Snake Game in ReScript","description":"Let's create a simple snake game in ReScript without using any framework.Full code here https://github.com/Exegetech/snake-rescript00:00 Getting started03:20...","image":"https://i.ytimg.com/vi/f0gDMjuaCZo/maxresdefault.jpg","url":"https://www.youtube.com/watch?v=f0gDMjuaCZo"},{"title":"ReScript and EdgeDB | Gel Blog","description":"Learn how together ReScript and EdgeDB achieve full type safety with less busy work. This post shows you the benefits and how you can get started with this pairing today!","image":"https://www.geldata.com/_images/_blog/ab9848d310c94bb25e21f219ee74b7f24ca16baa.jpg","url":"https://www.geldata.com/blog/rescript-and-edgedb"},{"title":"Building and consuming REST API in ReScript with rescript-rest and Fastify","description":"In the video, I show how you can use my ReScript Rest library to create an HTTP server with Fastify, generate OpenAPI for it, and then consume it on the clie...","image":"https://i.ytimg.com/vi/37FY6a-zY20/maxresdefault.jpg?sqp=-oaymwEmCIAKENAF8quKqQMa8AEB-AH-CYAC0AWKAgwIABABGEsgXShlMA8=&rs=AOn4CLBrz-ZJf8pcr_1_YZCfiMUwFKqj6A","url":"https://www.youtube.com/watch?v=37FY6a-zY20"},{"title":"When and Where to use ReScript? The ReScript happy path","description":"Are you ever hesitant about adopting ReScript, or have you tried it and been frustrated? I will give you a realistic guide for adopting ReScript in the project. (Hint: Review your project architecture first). Tagged with rescript, typescript, architecture.","image":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fool4835vdaqw8vueb9b5.png","url":"https://dev.to/cometkim/when-and-where-to-use-rescript-the-rescript-happy-path-47ni"},{"title":"From TypeScript To ReScript | Serhii Potapov (greyblake)","description":"A blog about software development.","image":"https://www.greyblake.com/greyblake.jpeg","url":"https://www.greyblake.com/blog/from-typescript-to-rescript/"},{"title":"Getting rid of your dead code in ReScript","description":"Exploring ReScript's tools for eliminating dead code, keeping your repository clean and without... Tagged with rescript.","image":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12lsasc06v1a355i6rfk.jpeg","url":"https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba"},{"title":"Rescript React Error boundary usage","description":"Hi I was trying to capture the react errors. I had to write the bindings for the ErrorBoundary and... Tagged with rescript, react.","image":"https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3otvb2z646ytpt1hl2rv.jpg","url":"https://dev.to/srikanthkyatham/rescript-react-error-boundary-usage-3b05"},{"title":"Full-stack ReScript. Architecture Overview","description":"Can ReScript be used to create a full-featured back-end? In this article, I’d try to prove it can and does it with success.\n","image":"","url":"https://fullsteak.dev/posts/fullstack-rescript-architecture-overview"},{"title":"ReScript for React Development","description":"Looking for ReScript for React Development information? In this article, I highlight the development & business advantages of ReScript.","image":"https://scalac.io/wp-content/uploads/2021/08/ReScript-for-React-Development-FB.png","url":"https://scalac.io/blog/rescript-for-react-development/"},{"title":"Rewriting a Project in ReScript","description":"My experience reimplementing a small project in ReScript","image":"","url":"https://yangdanny97.github.io/blog/2021/07/09/Migrating-to-Rescript"},{"title":"Responsive Images and Cumulative Layout Shift","description":"Solving cumulative layout shift issue caused by responsive images in layouts.","image":"https://d20bjcorj7xdk.cloudfront.net/eyJidWNrZXQiOiJpbWFnZXMuYWxleGZlZG9zZWV2LmNvbSIsImtleSI6Im1ldGEtYmxvZy5wbmciLCJlZGl0cyI6eyJyZXNpemUiOnsid2lkdGgiOjEyMDAsImhlaWdodCI6NjMwLCJmaXQiOiJjb3ZlciJ9LCJqcGVnIjp7InF1YWxpdHkiOjkwfX19?signature=d8e6c0ac1ff03d0f5ee04d128b96a7701b998952a38ba96e9a16e4414cd05ed0&version=58cfd6f8abdefeca2195a6a1f1108596","url":"https://alexfedoseev.com/blog/post/responsive-images-and-cumulative-layout-shift"},{"title":"ReScript records, NextJS, undefined and getStaticProps","description":"NextJS, a pretty solid framework for building React based websites and web-applications, offers a nic... Tagged with rescript, javascript, nextjs.","image":"https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3otvb2z646ytpt1hl2rv.jpg","url":"https://dev.to/ryyppy/rescript-records-nextjs-undefined-and-getstaticprops-4890"}]
2+

scripts/generate_resources.res

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,34 @@
77
*/
88
/** this is the list of community resources we want to generate */
99
let sites = [
10-
"https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba",
11-
"https://www.daggala.com/belt_vs_js_array_in_rescript/",
10+
// 2025
11+
"https://dev.to/dzakh/javascript-schema-library-from-the-future-5420",
12+
"https://www.youtube.com/watch?v=yKl2fSdnw7w",
13+
// 2024
14+
"https://www.youtube.com/watch?v=MC-dbM-GEuw",
15+
"https://dev.to/jderochervlk/rescript-has-come-a-long-way-maybe-its-time-to-switch-from-typescript-29he",
16+
"https://www.youtube.com/watch?v=f0gDMjuaCZo",
17+
"https://www.geldata.com/blog/rescript-and-edgedb",
18+
"https://www.youtube.com/watch?v=37FY6a-zY20",
19+
// 2023
20+
"https://dev.to/cometkim/when-and-where-to-use-rescript-the-rescript-happy-path-47ni",
21+
// 2022
1222
"https://www.greyblake.com/blog/from-typescript-to-rescript/",
23+
"https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba",
24+
"https://dev.to/srikanthkyatham/rescript-react-error-boundary-usage-3b05",
25+
// "https://www.daggala.com/belt_vs_js_array_in_rescript/" I think we should exclude this one since it's related to API we are deprecating
26+
// 2021
1327
"https://fullsteak.dev/posts/fullstack-rescript-architecture-overview",
1428
"https://scalac.io/blog/rescript-for-react-development/",
1529
"https://yangdanny97.github.io/blog/2021/07/09/Migrating-to-Rescript",
1630
"https://alexfedoseev.com/blog/post/responsive-images-and-cumulative-layout-shift",
31+
"https://dev.to/ryyppy/rescript-records-nextjs-undefined-and-getstaticprops-4890",
1732
]
1833

1934
let generate = async () => {
2035
let filePath = "data/resources.json"
2136
let metaData = await MetaTagsApi.getMetaTags(sites)
2237

23-
Console.log(metaData)
24-
2538
let fileContent = `${metaData
2639
->Array.map(i =>
2740
{

src/components/Button.res

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ type size = Small | Large
33
/* type theme = Light | Dark */
44

55
@react.component
6-
let make = (~kind: kind=PrimaryRed, ~size: size=Large, ~children) => {
6+
let make = (
7+
~kind: kind=PrimaryRed,
8+
~size: size=Large,
9+
~children,
10+
~onClick: option<JsxEventU.Mouse.t => unit>=?,
11+
) => {
712
let bgColor = switch kind {
813
| PrimaryRed => "bg-fire hover:bg-fire-70 text-white"
914
| PrimaryBlue => "bg-sky hover:bg-sky-70 text-white"
@@ -16,6 +21,7 @@ let make = (~kind: kind=PrimaryRed, ~size: size=Large, ~children) => {
1621
}
1722

1823
<button
24+
?onClick
1925
role="button"
2026
className={`select-none hover:cursor-pointer transition-colors duration-200 body-button focus:outline-none ${bgColor} ${padding}`}>
2127
children

src/components/Button.resi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ type kind = PrimaryRed | PrimaryBlue | SecondaryRed
22
type size = Small | Large
33

44
@react.component
5-
let make: (~kind: kind=?, ~size: size=?, ~children: React.element) => React.element
5+
let make: (
6+
~kind: kind=?,
7+
~size: size=?,
8+
~children: React.element,
9+
~onClick: JsxEventU.Mouse.t => unit=?,
10+
) => React.element

src/components/CommunityResources.res

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ let simplifyUrl = url =>
1616
->Array.at(0)
1717

1818
module LinkCard = {
19-
Console.log(resources)
2019
@react.component
2120
let make = (~link) => {
2221
<div
@@ -37,18 +36,35 @@ module LinkCard = {
3736

3837
module LinkCards = {
3938
@react.component
40-
let make = () =>
41-
<div className="grid md:grid-cols-2 gap-6">
42-
{resources
43-
->Array.map(link =>
44-
switch link.image {
45-
| "" => {...link, image: "/static/Art-3-rescript-launch.jpg"}
46-
| _ => link
39+
let make = () => {
40+
let (seeAll, setSeeAll) = React.useState(() => false)
41+
<>
42+
<div className="grid md:grid-cols-2 gap-6">
43+
{switch seeAll {
44+
| true => resources
45+
| false => resources->Array.slice(~start=0, ~end=6)
4746
}
48-
)
49-
->Array.map(link => <LinkCard link key=link.title />)
50-
->React.array}
51-
</div>
47+
->Array.map(link =>
48+
switch link.image {
49+
| "" => {...link, image: "/static/Art-3-rescript-launch.jpg"}
50+
| _ => link
51+
}
52+
)
53+
->Array.map(link => <LinkCard link key=link.title />)
54+
->React.array}
55+
</div>
56+
<div className="w-full flex justify-center mt-10">
57+
<Button onClick={_ => setSeeAll(prev => !prev)}>
58+
{React.string(
59+
switch seeAll {
60+
| true => "See less"
61+
| false => "See all"
62+
},
63+
)}
64+
</Button>
65+
</div>
66+
</>
67+
}
5268
}
5369

5470
@react.component

0 commit comments

Comments
 (0)