First acquaintance with React Native
Of course, I’m just one of thousands who started building apps using React Native. But whatever, it’s a cool experience.
Of course, I’m just one of thousands who started building apps using React Native. But whatever, it’s a cool experience.
I use PyCharm for python projects and pipenv for package management. Start new PyCharm project named django-rest-react-blog Optionally git init clone gist .gitignore for Django and React projects Main course pipenv install django pipenv install djangorestframework pipenv install ipython --dev django-admin.py startproject bookcase cd bookcase python manage.py startapp mainapp Edit bookcase/settings.py: ... INSTALLED_APPS = [ ... 'rest_framework' ] ... TEMPLATES = [ { ... 'DIRS': [BASE_DIR / 'mainapp-ui/build'], ... }, ] ... STATIC_ROOT = BASE_DIR / 'static' STATICFILES_DIRS = ( (BASE_DIR / 'mainapp-ui/build/static'), ) Edit mainapp/views.py: from django.shortcuts import render def index(request): return render(request, 'index.html', {}) Edit bookcase/urls.py: ... from mainapp.views import index urlpatterns = [ ... path('', index) ] make dir mainapp/api with files there: ...
I wrote a traditional application for such kind of training cases in React. This is a simple to-do list. In my app, I don’t use any extensions for state management. Only clean React with state saving in local storage. I spied the main ideas on the Udemy course “React + Redux. Professional development”. But mostly I tried to write the code myself. I would like to dive into React Native a bit and migrate this app to Android. But it depends on the availability of free time. ...