H
H
Heretic Man2020-01-28 14:42:19
Node.js
Heretic Man, 2020-01-28 14:42:19

How to create blocks with frames in react native whose behavior would be like in css - border-collapse: collapse?

I create blocks, it turns out like this:
5e301d6ad510e831408067.png

And I would like this:
5e301db089a92755952641.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-05-02
@Robur

There are two options:
1) store the role in the same place where you store the user (you didn’t specify where it comes from - local database, oauth, whatever) and get the role as a user attribute in req.user
2) make a table in your database where store roles for each user - store roles for each id. if necessary, get a role to make a request to the database with an id from req.user, get roles and do what you need.
The UI can get roles either from a token (if for example it's OAuth/OpenID) or make a request to the server when loading the application/login and get the roles from there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question