Added session persistence. #141
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#90
Description
Code entered in the editor will now persist on a refresh using sessionStorage in JavaScript.
Change Log
view and editor js files updated with new instantiation code, as well as a line for storing editor code in sessionStorage on change.
-
<FILE CHANGED>:view/index.js
view/editor/index.js
Manual Test Steps
Run the editor as usual. There is a popup alert that shows the code in the variable containing sessionStorage, feel free to comment this out when moving to master. The line is near the top of componentDidMount in the Editor class definition.