Skip to content
Advertisement

Tag: reactjs

React Native, why secureTextEntry not working?

Why is my secureTextEntry not working ? Here is my code: Answer secureTextEntry does not work with multiline. Here is what React Native’s documentation says: secureTextEntry If true, the text input obscures the text entered so that sensitive text like passwords stay secure. The default value is false. Does not work with multiline={true}. In order to have it working, remove

React componentDidMount setState but return undefined

I can get list with get axios.get method. then ı can use setState and it works flawlessly. but the return is not true , its return undefined console.log(result) => undefined . How can ı check if setState work fine return true or return false ? Answer Your return true statement is in setState’s post-set callback. It won’t be propagated to

Take array Index values in onClick event

how to write an onClick event in my react app to take array index in this code? I just want to get array index as a output This is my array in JSON file. This is my array import ) This is the women array output } Women tab output Currently I get output like this. Women tab expect output

Regex for hashtags tree takes too long to execute

In our app we have topics which user can create, and each topic must have it’s own hashtag (or hashtags hierarchy). We have this kinda Regex for validation: What i need is for user to be able to create hashtags which have structure like this: (#) symbol Text in lowercase Optional slash (/) followed by lowercase text to create hierarchy

Location me in map from React Leaflet

I want to ask if I use a map from React Leaflet (https://react-leaflet.js.org/) but how do I add a location button to the map? like this an example of the location me button in the image that I gave the red arrow And pictures in the link: Example of an arrow Location Me An example on my map where I

“npm install” not working for react project pulled from github

I’m on ubuntu 20.04.4 LTS. I’m trying to install locally a react project. I tried to clone de repo from github, and install locally the react app, doing this : git clone https://github.com/OpenClassrooms-Student-Center/7008001-Debutez-avec-React.git then npm install –verbose But it just won’t work. this is the output : I searched a while but I just don’t understand… As you might have

Advertisement