These are chat archives for FreeCodeCamp/HelpJavaScript

23rd
Dec 2018
enestatli
@enestatli
Dec 23 2018 16:38
anyone here to help me Tkinter GUI using with classes?
sorry wrong chat! :D
Ankur sharma
@ankur1163
Dec 23 2018 18:29
same here ;) @JohnnyBizzel
Pagnito
@Pagnito
Dec 23 2018 18:45
i dont understand, im tryin to use prettier in vs code but the command wont work
instead of running prettier cmd shift p, it just runs cmd p to type on top of app to search for files
firgured it out
Pagnito
@Pagnito
Dec 23 2018 20:50
anyone knows a good source for node js docs that actually give a thorough explanation for the methods
tundeiness
@tundeiness
Dec 23 2018 21:18
I need help with this task please https://learn.freecodecamp.org/front-end-libraries/react-and-redux/extract-local-state-into-redux . These tests are not passing: Dispatching the submitMessage on the Presentational component should update Redux store and clear the input in local state.
The Presentational component should render the messages from the Redux store.
tundeiness
@tundeiness
Dec 23 2018 21:40
solved ... :)
alpox
@alpox
Dec 23 2018 21:43
@Pagnito the best resource is the nodejs docs themselves
Pagnito
@Pagnito
Dec 23 2018 21:43
yea but they arent very thorough
alpox
@alpox
Dec 23 2018 21:44
@Pagnito do you have a specific need? Maybe I can help
Pagnito
@Pagnito
Dec 23 2018 21:46
not atm, im taking a nodejs course that made a few false promises, so i im lookin into docs to fully understand. And also understand nuances like fs.open which creates a file if it doesnt exist
but actually one thing u can help me with
is appending to a file
alpox
@alpox
Dec 23 2018 21:47
Hmm I found the docs quite ok for that
Pagnito
@Pagnito
Dec 23 2018 21:47
i read on stackoverflow, u can use appendFile, but for large amount of operations its better to use streams
alpox
@alpox
Dec 23 2018 21:49
@Pagnito appendFile?
Ah yes sure
Pagnito
@Pagnito
Dec 23 2018 21:50
yea, but i was wondering about doing it with streams, but ill do that a bit later, i dont wanna busy u for somethin im not really focusing on atm
With this you create a write stream
In the parameter flag you can define that you want to append
These are the possible flags you can pads
Pass
You'd probably just use 'a'
As result to the call to createWriteStream you get the Writable stream interface
Which you can then use to write to the file
You then mostly just use .write to pass data through the stream into the file
Pagnito
@Pagnito
Dec 23 2018 21:58
sweet thnx, i was lookin for the flags