# React.js – Get started in Dart #2

In [Part 1](https://creativebracket.com/react-js-get-started-in-dart-1/) of this series, we built our `Greeting` component that took a name parameter and rendered this onto the screen. Here’s what the snippet for this looked like:

```dart
var Greeting = createReactClass({
  "render": allowInteropCaptureThis(
    (ReactClassInterface self) => React.createElement(
      'h1', null, ['Hello, ${getProperty(self.props, "name")}']),
  )
});
```

And we used it by doing:

```dart
void main() {
  ReactDOM.render(
    React.createElement(
      Greeting,
      makeJsObject({
        'name': 'John'
      }),
      null,
    ),
    querySelector('#output'),
  );
}
```

In this part, we will refactor our solution and proceed to build out the stateful component example.

%[https://www.youtube.com/watch?v=bdrqQXg2Gjs] 

## **Further reading**

1. [js package](https://pub.dartlang.org/packages/js)
    
2. [How to Use JavaScript libraries in your Dart applications](http://localhost:8080/how-to-use-javascript-libraries-in-your-dart-applications/)
    
3. [**Full-stack web development with Dart**](https://bit.ly/fullstackdart)
