Skip to content

Commit d45048a

Browse files
authoredNov 6, 2017
Merge pull request #417 from thewtex/doc-tweaks
docs(DevelopClassDocs): Grammar tweaks and improvements
2 parents 455dfbc + b40002e commit d45048a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎Documentation/content/docs/develop_class.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: Creating a new class in vtk.js
44
This guide illustrates how to add new classes to the vtk.js repository and the concepts behind the infrastructure we use.
55

66
First of all, vtk.js does not rely on the class definition that was brought in with the ES6 specification. Instead, vtk.js provides a closure based infrastructure which lets us compose methods into specific instances without any hierarchical constraint.
7-
Due to our closure paradigm methods can be used outside of their instance context and can be directly be passed as callbacks. Therefore their usage does not require `this` to be referenced each time.
7+
Due to our closure paradigm methods can be used outside of their instance context and can be directly be passed as callbacks. Therefore their usage does not require `this` to be referenced each time.
88

9-
By convention, we create a directory for each of our class. The name of the directory must be the name of the class capitalized without its "vtk" prefix (although when importing a class, we will readd the "vtk" prefix). The definition of that class should be held in an "index.js" file within that directory.
9+
By convention, we create a directory for each of our class. The name of the directory must be the name of the class capitalized without its "vtk" prefix (although when importing a class, we will add the "vtk" prefix). The definition of that class should be held in an "index.js" file within that directory.
1010

1111
```js
1212
import vtkDataSet from 'vtk.js/Sources/Common/DataModel/DataSet';
@@ -41,8 +41,8 @@ For instance, vtk.js currently have the following set of **kits** in bold and *m
4141
## Class definition
4242

4343
Here is an example of how to get started writing a new class for vtk.js.
44-
The design inspiration originated from Douglas Crockford with functional inheritance but we went further in some way too and the [blog](https://medium.com/javascript-scene/functional-mixins-composing-software-ffb66d5e731c) provides a very good background on the technics we use and leverage inside vtk.js.
45-
That other [blog](https://medium.com/@kentcdodds/classes-complexity-and-functional-programming-a8dd86903747) also explain why classes in JavaScript are not always the best choice.
44+
The design inspiration originated from Douglas Crockford with functional inheritance, but we went further in some ways, too. This [blog](https://medium.com/javascript-scene/functional-mixins-composing-software-ffb66d5e731c) provides a very good background on the techniques we use and leverage inside vtk.js.
45+
This [blog](https://medium.com/@kentcdodds/classes-complexity-and-functional-programming-a8dd86903747) also explains why classes in JavaScript are not always the best choice.
4646

4747

4848
```js MyClass/index.js

0 commit comments

Comments
 (0)
Please sign in to comment.