S
S
Stergy2018-08-28 18:06:09
JSON
Stergy, 2018-08-28 18:06:09

How to write a form (select) in react?

Hello, I'm a total newbie.
Such a task is worth it.
There is a Json file:

SOME_JSON =[{"name1": "Some_name1", "id": 123}, {"name2": "Some_name2", "id": 987}]

How can I write a form in React that would use this JSON file and display the value of the and elements as fields ? Perhaps somewhere there are examples of the implementation of such a form? Many thanks in advance to everyone for their help. <select>name1name2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-08-28
@Stergy

Hello, I'm a total newbie.

So start your acquaintance with the library by studying the documentation .
After reading the paragraphs below, you will be able to solve the task assigned to you:
Working with forms.
Building lists.
If it still doesn't work after that, go through the tutorial .
If you have an idea how to do this, but have specific questions - ask.
The select itself can be implemented native or custom. The second option is more difficult, but it is usually used.
You can always install and style the vendor library, which will save you time. Just search for react select and see the options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question