sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

Comments: Add the Create Note Page

Open jayair opened this issue 9 years ago • 14 comments

Link to chapter - http://serverless-stack.com/chapters/add-the-create-note-page.html

jayair avatar Apr 10 '17 01:04 jayair

I'm having an issue updating the disable attribute to 'false' on the 'create' button once I type in a few characters into the text field or upload a file. My NewNote.js is identical to the one in the tutorial. I've tried multiple times going through the tutorial steps after resetting to a past commit, but to no avail.

Here's a couple screenshots (First - no text, Second - test note):

no-content content

ScottMTravers avatar May 02 '17 17:05 ScottMTravers

@ScottMTravers just to make sure, are there any errors that are showing up in the browser console? Also, what browser & OS combo are you on?

jayair avatar May 03 '17 00:05 jayair

Using Chrome & Mac OSX 10.11.

Here's the error showing up in my console: Uncaught Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

ScottMTravers avatar May 03 '17 00:05 ScottMTravers

Fixed the issue.

My notes-app-client was located inside the root directory of my notes-app-api instead of a separate project folder.

ScottMTravers avatar May 03 '17 17:05 ScottMTravers

@ScottMTravers Oh! It's a bit of a gotcha. We should make that clear when we start the frontend portion. Thanks for reporting back.

jayair avatar May 03 '17 19:05 jayair

why does handleSubmit need event.preventDefault ? isnt it only a regular button action that needs this really ?

walshe avatar Mar 01 '18 18:03 walshe

@walshe In this case it is a submit button. You could skip it. But if you had another field that you could "enter" to submit then you'll need it.

jayair avatar Mar 01 '18 20:03 jayair

screen shot 2018-03-28 at 20 00 44 Hello, I got this error, when I try to post my notes.

mochfauz avatar Mar 28 '18 13:03 mochfauz

@mbahfauz Are you logged in?

jayair avatar Mar 28 '18 15:03 jayair

Already solve the problem, I was forget to change my api url on IAM roles. Thanks jayair.

mochfauz avatar Mar 29 '18 10:03 mochfauz

I get the following access denied error uploading an attachment. Local testing worked fine. Any thoughts on what might be causing this and how to fix it? Thanks.

PUT https://notes-app-uploads-takecontrol.s3.amazonaws.com/private/us-east-1%3A617058f3-510a-4e29-a4c1-264aa7e56291/1523457483356-10%20things%20that%20require%20zero%20talent.png 403 (Forbidden) StorageClass - error uploading: Error: Access Denied at Request.extractError

sunkay avatar Apr 11 '18 14:04 sunkay

@sunkay There seems to be a IAM policy related issue. But what did you mean by in local testing it worked fine?

jayair avatar Apr 11 '18 23:04 jayair

@jayair There was a typo in my S3 iam policy. Double checked and fixed it. Thanks for the pointer.

sunkay avatar Apr 12 '18 11:04 sunkay

This issue was moved to https://discourse.serverless-stack.com/t/comments-add-the-create-note-page/107

jayair avatar May 09 '18 19:05 jayair