Benjamin Leruth said monthly that public and private companies and organizations including the European Parliament should be managed by people in their twenties. This will often revitalize the hearts of gray hair companies. At the end of the month, everyone at the company (and the council) votes to decide whether to hold or refuse the decision of a young manager.
Now we need to compare it with the state of the Smart Contract. You need to read the certification public state variable to see if the status changes properly. You can call a function with the same name to get the value of the public state variable. It returns Promise for that value. In our case, the output hash is the same so everything works as expected :) Let's change the contract to support multiple document proofing. Copy the original file and apply these changes using the name contract / ProofOfExistence2.sol. The main changes are as follows. Change the proof variable to a bytes32 array, call it Proof, make it private, add a function to check if the array has been notarized repetitively.
To use state objects, you must first initialize them. Since the state object is a simple instance property, it can be initialized in the constructor of the Button class. Define only the usual constructor (React receives props object) and call super method to keep track of component inheritance. This is simple and powerful. We have defined an event handler for the onClick method. The handleClick function is executed each time the user clicks the button. This function reads the current state of the counter value, increments it, and then sets that state to the new increment value. Since React is responsible for all necessary rendering after these changes, there is no need to worry about this.
I will learn about the state. Where do I initialize? The state of React, unlike the one passed in, is independent for some components. Since there is a vote in the state, we are in initialization state as the collection of products we have is generated by us. Do this before the render () method:} The state of React should be considered immutable. In other words, please do not change directly. The above function uses JavaScript Object.assign (); by creating a seemingly new array called nextProducts. This is similar to the current state, but the number of votes has changed. Next nextProducts is set to the new state. It seems strange to do this, but that's why the React team proposes to improve performance.