Guys I have very lame question on React. Please help
I have a textfield, which should show a text I am passing through props. If user edits it and the clicks somewhere else, it should again show the text from props. If user edits it and hits Enter key, it should set the props (parent's state)
@entithat Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
I mean I just want to run this line await connection.dropCollection('users'); but it will raise an error and the code after it won't execute. Is there any way to drop collection without error if it does not exist? (without using double try-catch block)
Hola. Quick google does not help me. How do I console.log something and have it persist after the render of the page. i.e. I need a console.log output of something just before the re-render, but I cannot see it because it happens too quick
@entithat why isn't the top level try/catch not working for what you want? The catch block is so you can handles specific errors. You can also convert it away from async/await syntax and go with the original promise syntax. connection.dropCollection('users').then().catch()
Hi guys, I hope you all find my message well. I am new to cloud native development. I want to follow a git repo which can guide me through project structure and other rules of product development. i understand java and design patterns, I am aware of ES5, ES6.
@NavdeepSingh Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
Hey guys, I'm looking at being able to understand node cpu profiling better
in this example: https://gist.github.com/dpchamps/9442f238c14ddc85fcecc8b7cd148edd I know *why* the reduceFast is more performant than reduceSlow. But i would like to be able to explain why from the logs
more specifically, looking at the js top-down calls, what can i glean from the fact that two internal node calls (i'm assuming native library calls) .nvm/versions/node/v10.15.3/bin/node have such a drastic difference in execution times (25.5 seconds vs 84 ms)
@ChristianMatthew I have a textfield, which should show a text I am passing through props. If user edits it and the clicks somewhere else, it should again show the text from props. If user edits it and hits Enter key, it should set the props (parent's state)
I'm having some problems with binding the value of an input, I have done it on another component of my app and it worked fine, but somehow I can't get it works on another component. I'm only getting the first letter and not the whole text
This is my component
class Post extends Component {
c...
Well. I have a parent component which got some property say "size". Then I have a child component TextField. Now size can be changed from outside as well as from textfield. If it changes from somewhere else, textfield should update accordingly.
@ChristianMatthew The concepts explained in this tutorial are already used by me. Like App component is rendering RandomButton and RandomButton can also communicate with App component. I don't think you even understood what the problem is in making the textfield editable
As soon as I want to make the TextField editable, I need to keep its own textValue state. And onChange function would update the textVal state, not the main text prop coming from Parent component. Now whenever App's text state changed, I need to update TextField's local textVal state as well. So i think I should pass a key to TextField component and make it uncontrolled component
But I don't think setting state undefined is good thing. Basically our textVal state is sometimes derived from parent props. I should try reactjs.org/blog/2018/06/07/…
I have a working reactjs project that I created with create-react-app --typescript option.
when running npm run start my app works completely fine.
When doing npm run-script build my app builds fine aswell with a few in-component warnings that are not really relevant because I get them on devel...