I love RN but one issue that is really annoying me is lack of conventions. I'm used to it a bit as a js developer. But using ES6 or not
render() {
vs. render: function() {
is one thing. What I really can't understand is when I saw the WebView module export example as
exports.examples = [
{
title: 'WebView',
render(): ReactElement { return <WebViewExample />; }
}
];
And sometimes I see
export default PDFView;
I'm used to
module.exports = WebViewExample
Returning an object breaks my code and forces me to think about what type I should expect from each component. I understand the value of returning an object but it seems like a bad thing to start introducing in the docs. End of rant. What is default
is for?