Skip to content

Commit 90baa7a

Browse files
committed
Revert "Merge branch 'nextjs-12' of https://github.com/JiaeK/rescript-lang.org into nextjs-12"
This reverts commit 5334930, reversing changes made to 25d4a35.
1 parent 5334930 commit 90baa7a

11 files changed

+17
-46
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ If you need inspiration on what to work on, you can check out issues tagged with
3030

3131
We really appreciate all input from users, community members and potential contributors. Please make sure to consider the other person's opinion and don't assume any common knowledge.
3232

33-
**Most importantly: Keep it professional and be nice to each other**
33+
**Most importantly: Keep it professional and be nice to eachother**
3434

35-
There might be situations where others don't understand a proposed feature or have different opinions on certain writing styles. That's fine, discussions are always welcome! Communicate in clear actionables, make your plans clear and always stick to the original topic.
35+
There might be situations where others don't understand a proposed feature or have different opinions on certain writing styles. That's fine, discussions are always welcome! Communicate in clear actionables, make your plans clear and always to stick to the original topic.
3636

3737
If other contributors disagree with certain proposals and don't change their mind after longer discussions, please don't get discouraged when an issue gets closed / postponed. Everyone tries their best to make the platform better, and to look at it in another perspective: Closed issues are also a highly valuable resource for others to understand technical decisions later on.
3838

3939
### Communicate your Time Commitment
4040

4141
Open Source development can be a challenge to coordinate, so please make sure to block enough time to work on your tasks and show commitment when taking on some work. Let other contributors know if your time schedule changes significantly, and also let others know if you can't finish a task.
4242

43-
We value your voluntary work, and of course it's fine to step back from a ticket for any reason (we can also help you if you are getting stuck). Please talk to us in any case, otherwise we might re-assign the ticket to other contributors.
43+
We value your voluntary work, and of course it's fine to step back from a ticket for any reasons (we can also help you if you are getting stuck). Please talk to us in any case, otherwise we might re-assign the ticket to other contributors.
4444

4545
### Communication Channels
4646

@@ -66,7 +66,7 @@ Always check if there are any designs for certain UI components and think about
6666
### Technical Writing (Documentation)
6767

6868
- Think and write in a JS friendly mindset when explaining concepts / showing examples.
69-
- No `foo` examples if somewhat possible. Try to establish practical context in your showcase examples.
69+
- No `foo` examples if somewhat possible. Try to establish practical context in your show case examples.
7070
- No references to `OCaml`. ReScript is its own language, and we don't rely on external resources of our host language.
7171
- If possible, no references to `Reason` examples / external resources. Our goal is to migrate everything to ReScript syntax.
7272

data/sidebar_react_latest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Overview": [
33
"introduction",
44
"installation",
5-
"migrate-react"
5+
"migrate-from-v3"
66
],
77
"Main Concepts": [
88
"elements-and-jsx",

data/sidebar_react_v0100.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Overview": [
33
"introduction",
44
"installation",
5-
"migrate-react"
5+
"migrate-from-reason-react"
66
],
77
"Main Concepts": [
88
"elements-and-jsx",

pages/docs/manual/latest/let-binding.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let message = {
3535
let part2 = "world"
3636
part1 ++ " " ++ part2
3737
}
38-
// `part1` and `part2` are not accessible here!
38+
// `part1` and `part2` not accessible here!
3939
```
4040
```js
4141
var message = "hello world";
@@ -72,7 +72,7 @@ Let bindings are "immutable", aka "cannot change". This helps our type system de
7272

7373
## Binding Shadowing
7474

75-
The above restriction might sound impractical at first. How would you change a value then? Usually, 2 ways:
75+
The above restriction might sound unpractical at first. How would you change a value then? Usually, 2 ways:
7676

7777
The first is to realize that many times, what you want isn't to mutate a variable's value. For example, this JavaScript pattern:
7878

@@ -181,5 +181,5 @@ Still, `%%private` is useful in the following scenarios:
181181

182182
- **Code generators.** Some code generators want to hide some values but it is sometimes very hard or time consuming for code generators to synthesize the types for public fields.
183183

184-
- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet, `%%private` provides you such convenience.
184+
- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet, `%%private` provide you such convenience.
185185

pages/docs/manual/latest/migrate-from-bucklescript-reason.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Enjoy the improved experience!
2626

2727
### Upgrade Individual Folders
2828

29-
This is useful for per-directory conversions:
29+
This is useful for per-directory convertions:
3030

3131
```console
3232
# *.rei, *.ml, *.mli,....
@@ -56,7 +56,7 @@ npx rescript convert -all
5656
- First class module: from `(module S: Student)` to `module(S: Student)`.
5757
- No custom infix operator for now (including `mod`).
5858
- Object access: from `settings##visible #= true` to `settings["visible"] = true`. Rejoice!
59-
- Object: from `Js.t({"age": int})` to just `{"age": int}`. The `Js.t` part is now unneeded.
59+
- Object: from `Js.t({"age": int})` to just `{"age": int}`. The `Js.t` part is now uneeded.
6060
- Attribute: from `[@myAttribute "hello"]` to `@myAttribute("hello")`. From `[%re bla]` to `%re(bla)`.
6161
- Removed dereference syntax `result^`. Just use `result.contents`.
6262
- `fun` pattern matching syntax removed.

pages/docs/manual/latest/primitive-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ ReScript's `true/false` compiles into a JavaScript `true/false`.
156156

157157
32-bits, truncated when necessary. We provide the usual operations on them: `+`, `-`, `*`, `/`, etc. See [Js.Int](api/js/int) for helper functions.
158158

159-
**Be careful when you bind to JavaScript numbers!** Since ReScript integers have a much smaller range than JavaScript numbers, data might get lost when dealing with large numbers. In those cases, it’s much safer to bind the numbers as **floats**. Be extra mindful of this when binding to JavaScript Dates and their epoch time.
159+
**Be careful when you bind to JavaScript numbers!** Since ReScript integers have a much smaller range than JavaScript numbers, data might get lost when dealing with large numbers. In those cases it’s much safer to bind the numbers as **float**. Be extra mindful of this when binding to JavaScript Dates and their epoch time.
160160

161161
To improve readability, you may place underscores in the middle of numeric literals such as `1_000_000`. Note that underscores can be placed anywhere within a number, not just every three digits.
162162

pages/docs/manual/latest/tuple.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ canonical: "/docs/manual/latest/tuple"
66

77
# Tuple
88

9-
Tuples are a ReScript-specific data structure that doesn't exist in JavaScript. They are:
9+
Tuples are a ReScript-specific data structure that don't exist in JavaScript. They are:
1010

1111
- immutable
1212
- ordered

pages/docs/manual/latest/type.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ canonical: "/docs/manual/latest/type"
99
Types are the highlight of ReScript! They are:
1010
- **Strong**. A type can't change into another type. In JavaScript, your variable's type might change when the code runs (aka at runtime). E.g. a `number` variable might change into a `string` sometimes. This is an anti-feature; it makes the code much harder to understand when reading or debugging.
1111
- **Static**. ReScript types are erased after compilation and don't exist at runtime. Never worry about your types dragging down performance. You don't need type info during runtime; we report all the information (especially all the type errors) during compile time. Catch the bugs earlier!
12-
- **Sound**. This is our biggest differentiator versus many other typed languages that compile to JavaScript. Our type system is guaranteed to **never** be wrong. Most type systems make a guess at the type of a value and show you a type in your editor that's sometimes incorrect. We don't do that. We believe that a type system that is sometimes incorrect can end up dangerous due to expectation mismatches.
12+
- **Sound**. This is our biggest differentiator versus many other typed languages that compile to JavaScript. Our type system is guaranteed to **never** be wrong. Most type systems make a guess at the type of a value and show you a type in your editor that's sometime incorrect. We don't do that. We believe that a type system that is sometime incorrect can end up being dangerous due to expectation mismatches.
1313
- **Fast**. Many developers underestimate how much of their project's build time goes into type checking. Our type checker is one of the fastest around.
1414
- **Inferred**. You don't have to write down the types! ReScript can deduce them from their values. Yes, it might seem magical that we can deduce all of your program's types, without incorrectness, without your manual annotation, and do so quickly. Welcome to ReScript =).
1515

pages/docs/react/latest/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Then add the following setting to your existing `bsconfig.json`:
2828

2929
> The [new jsx transform](https://ko.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) of ReactJS is available with `mode: "automatic"`.
3030
31-
**Note** JSX v4 is newly introduced with the idomatic record-based representation of component. If your dependecies are not compatible with v4 yet, then you can use v3 in the same project. Check out the details in [Migrate from v3](/docs/react/latest/migrate-react)
31+
**Note** JSX v4 is newly introduced with the idomatic record-based representation of component. If your dependecies are not compatible with v4 yet, then you can use v3 in the same project. Check out the details in [Migrate from v3](/docs/react/latest/migrate-from-v3)
3232

3333
To test your setup, create a new `.res` file in your source directory and add the following code:
3434

pages/docs/react/latest/migrate-react.mdx renamed to pages/docs/react/latest/migrate-from-v3.mdx

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Migrate from JSX v3
33
description: "Migrate from JSX v3"
4-
canonical: "/docs/react/latest/migrate-react"
4+
canonical: "/docs/react/latest/migrate-from-v3"
55
---
66

77
# Migrate from JSX v3
@@ -211,32 +211,3 @@ let make = () => {
211211
</div>
212212
}
213213
```
214-
215-
### Mangling the prop name
216-
217-
The prop name was mangled automatically in v3, such as `_open` becomes `open` in the generated js code. This is no longer the case in v4 because the internal representation is changed to the record instead object. If you need to mangle the prop name, you can use the `@as` annotation.
218-
219-
Rewrite this:
220-
221-
```res
222-
module Comp = {
223-
@react.component
224-
let make = (~_open, ~_type) =>
225-
<Modal _open _type>
226-
<Description />
227-
</Modal>
228-
}
229-
```
230-
231-
To this:
232-
233-
```res
234-
module Comp = {
235-
@react.component
236-
let make =
237-
(@as("open") ~_open, @as("type") ~_type) =>
238-
<Modal _open _type>
239-
<Description />
240-
</Modal>
241-
}
242-
```

pages/docs/react/v0.10.0/migrate-react.mdx renamed to pages/docs/react/v0.10.0/migrate-from-reason-react.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Migrate from ReasonReact
33
description: "Migrate from ReasonReact"
4-
canonical: "/docs/react/latest/migrate-react"
4+
canonical: "/docs/react/latest/migrate-from-reason-react"
55
---
66

77
# Migrate from ReasonReact

0 commit comments

Comments
 (0)