create account

RE: Steem development #2: Make a JavaScript app using the Steem blockchain by edward.maesen

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @xenetics/steem-development-2-make-a-javascript-app-using-the-steem-blockchain

· @edward.maesen ·
$0.04
I got the app to work following your tutorial :) Your instructions are clear and concise. 
<hr>

I found ***one error*** in the instructions.
In "Displaying the followers" step 3 to modify `handleSubmit`, you still have your username hardcoded in the `getFollowers` call.
Instead of 
<sup>steem.api.getFollowers('xenetics', 0, 'blog', 100, (err, result) => {
</sup>it should be 
<sup>steem.api.getFollowers(<b><i>this.state.username</i></b>, 0, 'blog', 100, (err, result) => {
</sup>
<hr>

I found ***one slight deviation*** from your description regarding the react app setup:
I'm on Windows 10, and tried it out with my old node/npm installs (versions 6.11.4 and 3.10.10 respectively - I was hesitant to upgrade these versions since I rely on them for my local web servers)
After executing `create-react-app followers` I see references to `npm` instead of `yarn`:

![Capture-steem-tut-1.JPG](https://steemitimages.com/DQmPhVBCtsUYyZ7nuBz7gv3ppujznr8n5EaFXGCnCZ2xm5D/Capture-steem-tut-1.JPG)
Thus I can use `npm start` to run the server.
👍  
properties (23)
authoredward.maesen
permlinkre-xenetics-steem-development-2-make-a-javascript-app-using-the-steem-blockchain-20180111t203429654z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"image":["https://steemitimages.com/DQmPhVBCtsUYyZ7nuBz7gv3ppujznr8n5EaFXGCnCZ2xm5D/Capture-steem-tut-1.JPG"],"app":"steemit/0.1"}
created2018-01-11 20:34:30
last_update2018-01-11 20:34:30
depth1
children4
last_payout2018-01-18 20:34:30
cashout_time1969-12-31 23:59:59
total_payout_value0.036 HBD
curator_payout_value0.008 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,038
author_reputation1,485,647,258,381
root_title"Steem development #2: Make a JavaScript app using the Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,840,768
net_rshares6,326,833,052
author_curate_reward""
vote details (1)
@xenetics ·
Perhaps  it detected you didn't have yarn.  Thanks for the correction, glad you got it working.

Running steem locally would also be a great way to learn more about Steemjs and JS in general.
properties (22)
authorxenetics
permlinkre-edwardmaesen-re-xenetics-steem-development-2-make-a-javascript-app-using-the-steem-blockchain-20180112t014731657z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-12 01:47:30
last_update2018-01-12 01:47:30
depth2
children3
last_payout2018-01-19 01:47:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length191
author_reputation190,970,083,598
root_title"Steem development #2: Make a JavaScript app using the Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,890,152
net_rshares0
@edward.maesen ·
> Perhaps it detected you didn't have yarn.

Correct, I don't have yarn installed.

I upvoted my original comment to move it up in the comment section so that others may see the corrections.
properties (22)
authoredward.maesen
permlinkre-xenetics-re-edwardmaesen-re-xenetics-steem-development-2-make-a-javascript-app-using-the-steem-blockchain-20180112t041027049z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-12 04:10:27
last_update2018-01-12 04:10:27
depth3
children2
last_payout2018-01-19 04:10:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length190
author_reputation1,485,647,258,381
root_title"Steem development #2: Make a JavaScript app using the Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,912,821
net_rshares0
@xenetics ·
Thanks a lot for that. I tried editing my post but keep getting "An image did not save correctly" - I can't seem to fix the errors your pointed out. Hopefully people see your comment -- or can figure it out.
properties (22)
authorxenetics
permlinkre-edwardmaesen-re-xenetics-re-edwardmaesen-re-xenetics-steem-development-2-make-a-javascript-app-using-the-steem-blockchain-20180112t042626919z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-12 04:26:27
last_update2018-01-12 04:26:27
depth4
children1
last_payout2018-01-19 04:26:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length207
author_reputation190,970,083,598
root_title"Steem development #2: Make a JavaScript app using the Steem blockchain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id28,915,380
net_rshares0