Welcome to this exciting exercise where you'll get hands-on experience with JavaScript and Rockets using the SpaceX Open Source REST API. In this exercise, you'll have the chance to interact with data related to launches and rockets. Let's dive in and start exploring!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs") | |
| const path = require("path") | |
| const componentsDir = path.join(__dirname, "../src/components") | |
| const indexFilePath = path.join(__dirname, "../src/index.ts") | |
| let componentNames = new Set() | |
| let exportedComponents = new Set() | |
| // Read components from the directory |
- First choose an existing react plugin in elektra and add a new folder under widgets with an init.jsx file:
cd elektra/plugins/lbaas2/app/javascript/widgets/
mkdir test
cd test
touch init.jsx- Create a
init.jsxfile with your react application. Ex:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { | |
| useEffect, | |
| useState, | |
| forwardRef, | |
| useRef, | |
| useCallback, | |
| createRef, | |
| useMemo, | |
| } from "react" | |
| import Select from "react-select" |
