OpenLiberty / guide-rest-client-reactjs

A guide on how to access a simple RESTful web service and consume its resources with ReactJS in Open Liberty.
https://openliberty.io/guides/rest-client-reactjs.html
Other
2 stars 1 forks source link

SME Review #8

Closed rzgry closed 4 years ago

rzgry commented 4 years ago

Some quick thoughts. Will look at it in more detail later.

rzgry commented 4 years ago
salmad3 commented 4 years ago

Addressed the feedback @rzgry, thanks. The draft site is updating.

rzgry commented 4 years ago

Note: all the other dependencies that are installed in the project will show up in src/main/frontend/src/package.json that have already been generated for you through the create-react-app configuration. There are also pre-coded .css files that can be found in src/main/frontend/src/Styles.

Something like:

Note: the dependencies for the React frontend can be found in src/main/frontend/src/package.json and are installed before building the frontend by the frontend-maven-plugin configured in the pom.xml. Additionally there are also some provided css stylesheets that can be found in src/main/frontend/src/Styles..


The front end of your application uses Node.js to build your React code. The Maven project is configured for you to install Node.js, and populate the production files to the web content of your application.


import React from 'react';
import { render } from '@testing-library/react';
import App from './Components/App';

test('renders learn react link', () => {
  const { getByText } = render(<App />);
  const linkElement = getByText(/Artist Web Service/i);
  expect(linkElement).toBeInTheDocument();
});
``` -> still has reference to learn react link that doesnt exist in the test description. Change linkElement to titleElement or something similar.
salmad3 commented 4 years ago

At a high-level in this section it does explain the idea of the VDOM and the section ends off with a link to the documentation for more information. It helps to keep it as there is content on the rendering process.

The Virtual DOM improves the performance of your web application as it plays a crucial role in the rendering process. -> I would just take this line out. Doesn't really say what the vdom does and seems out of scope for this guide.

I believe we did not go into too much detail about this.setState or how states work as it is just referencing key JavaScript syntax in the file.

You don't explain how this.setState works or how state in react works. Might not be needed to explain it in detail in the guide but maybe link to the react docs about it.

Yes essentially, I updated the paragraph.

Once the state is updated, your component will mount all the children elements and component instances to the native UI. You will now have access to the native UI, and will be able to access to your children references, with the ability to trigger a new render pass. -> This paragraph is weird. Are you trying to say after the state has been updated. The component will re-render and display the artist data in the table.

salmad3 commented 4 years ago

Further feedback discussed and addressed.