Re:Things every React.js beginner should know
by Can_Not on Thursday January 28, 2016 @03:11PM
(#10990874)
Your example actually looks like a namespace disaster about to happen with "id". Needs some prefixing and/or improved naming conventions. I'm not really how making your template have "less logic" than your example would produce a usable template language.
Re:Things every React.js beginner should know
by mst on Monday January 25, 2016 @01:08PM
(#10968746)
I suspect it's because people regard the implied foreach loop of data-scope to not count as logicless. Personally I can see the arguments both ways, and have concluded that simply ensuring I'm using the same definition of logicless as the people I'm talking to is the best answer.
Re:Things every React.js beginner should know
by toolz on Monday January 25, 2016 @01:40PM
(#10968963)
Ahh, well I never claimed it was logicless. I claimed the templates were logicless, and they are. The logic is kept separate inside the processors that you bind to the template.
Re:Things every React.js beginner should know
by mst on Monday January 25, 2016 @02:44PM
(#10969428)
Except the -scope part means that the foreach-ness is indicated by the template, so people consider that to be not-logicless.
I understood your claim fine. I'm trying to explain why it might be considered false (and I did already say I consider the arguments each way basically hair splitting).
Re:Things every React.js beginner should know
by toolz on Monday January 25, 2016 @03:15PM
(#10969627)
Interesting, I've never imagined an identifier could be labeled as logic. There is no need for a scope, if you mean that the outer identifier is logic. Anything could be the identifier and inside the processor you could define anything to be the outer layer. You could flip data-attr and data-scope just as easily, so I'm not sure where there could ever be an argument that those things represent logic rather than markup.
Either way, I _think_ I have a better understand of potential conflicting views. Thanks for taking the time to explain.
<div data-scope="users"><div data-attr="name"></div></div>
Now I have everything I need to process this html with my logic to turn it into
<div id="users"> <div id="user_1"> Frank </div> <div id="user_2"> Bob </div> </div>
https://pakyow.org/
edit: I wish downvotes required commenting on why you're downvoting.